(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/file-dotlock.c) |
| |
| 852 | | | int file_dotlock_touch(struct dotlock *dotlock) |
| 853 | | | { |
| 854 | | | time_t now = time(NULL); |
| 855 | | | struct utimbuf buf; |
| 856 | | | int ret = 0; |
| 857 | | | |
| 858 | | | if (dotlock->mtime == now) |
Event 1:
Skipping " if". dotlock->mtime == now evaluates to false.
hide
|
|
| 859 | | | return 0; |
| 860 | | | |
| 861 | | | dotlock->mtime = now; |
| 862 | | | buf.actime = buf.modtime = now; |
| 863 | | | |
| 864 | | | T_BEGIN {
x /home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib/data-stack.h |
| |
49 | #define T_BEGIN \ |
50 | STMT_START { unsigned int _data_stack_cur_id = t_push(); |
| |
|
| 865 | [+] | | const char *lock_path = file_dotlock_get_lock_path(dotlock); |
Event 2:
dotlock is passed to file_dotlock_get_lock_path().
hide
|
|
 |
| 866 | | | if (utime(lock_path, &buf) < 0) { |
Event 11:
lock_path, which evaluates to NULL, is passed to utime() as the first argument. See related event 10.
hide
Null Pointer Dereference
The body of utime() dereferences lock_path, but it is NULL. The issue can occur if the highlighted code executes. See related event 11. Show: All events | Only primary events |
|
| |