Text   |  XML   |  ReML   |   Visible Warnings:

Null Pointer Dereference  at file-dotlock.c:729

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

file_dotlock_delete

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/file-dotlock.c)expand/collapse
Show more  
 691  int file_dotlock_delete(struct dotlock **dotlock_p)
 692  {
 693          struct dotlock *dotlock;
 694          const char *lock_path;
 695          struct stat st;
 696   
 697          dotlock = *dotlock_p;
 698          *dotlock_p = NULL;
 699   
 700[+]         lock_path = file_dotlock_get_lock_path(dotlock);
 701[+]         if (nfs_safe_lstat(lock_path, &st) < 0) {
 702                  if (errno == ENOENT) {
 703                          dotlock_replaced_warning(dotlock, TRUE);
 704                          file_dotlock_free(&dotlock);
 705                          return 0;
 706                  }
 707   
 708                  i_error("lstat(%s) failed: %m", lock_path);
 709                  file_dotlock_free(&dotlock);
 710                  return -1;
 711          }
 712   
 713          if (dotlock->ino != st.st_ino ||
 714              !CMP_DEV_T(dotlock->dev, st.st_dev)) {
 715                  dotlock_replaced_warning(dotlock, FALSE);
 716                  errno = EEXIST;
 717                  file_dotlock_free(&dotlock);
 718                  return 0;
 719          }
 720   
 721          if (dotlock->mtime != st.st_mtime && dotlock->fd == -1) {
 722                  i_warning("Our dotlock file %s was modified (%s vs %s), "
 723                            "assuming it wasn't overridden (kept it %d secs)",
 724                            lock_path,
 725                            dec2str(dotlock->mtime), dec2str(st.st_mtime),
 726                            (int)(time(NULL) - dotlock->lock_time));
 727          }
 728   
 729          if (unlink(lock_path) < 0) {
Show more  




Change Warning 7087.24737 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: