Text   |  XML   |  ReML   |   Visible Warnings:

Negative file descriptor  at file-dotlock.c:880

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

file_dotlock_replace

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/file-dotlock.c)expand/collapse
Show more  
 820  int file_dotlock_replace(struct dotlock **dotlock_p,
 821                           enum dotlock_replace_flags flags)
 822  {
 823          struct dotlock *dotlock;
 824          const char *lock_path;
 825   
 826          dotlock = *dotlock_p;
 827          *dotlock_p = NULL;
 828   
 829          if ((flags & DOTLOCK_REPLACE_FLAG_DONT_CLOSE_FD) != 0)
 830                  dotlock->fd = -1;
 831   
 832          lock_path = file_dotlock_get_lock_path(dotlock);
 833          if ((flags & DOTLOCK_REPLACE_FLAG_VERIFY_OWNER) != 0 &&
 834[+]             !file_dotlock_is_locked(dotlock)) {
expand/collapse

file_dotlock_is_locked

(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/file-dotlock.c)expand/collapse
Show more  
 874  bool file_dotlock_is_locked(struct dotlock *dotlock)
 875  {
 876          struct stat st, st2;
 877          const char *lock_path;
 878   
 879          lock_path = file_dotlock_get_lock_path(dotlock);
 880          if (fstat(dotlock->fd, &st) < 0) {
Show more  
Show more  




Change Warning 7091.24739 : Negative file descriptor

Priority:
State:
Finding:
Owner:
Note: