(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/lib-index/mail-cache.c) |
| |
| 76 | | | static void mail_cache_init_file_cache(struct mail_cache *cache) |
| 77 | | | { |
| 78 | | | struct stat st; |
| 79 | | | |
| 80 | | | if (cache->file_cache == NULL) |
Event 1:
Skipping " if". cache->file_cache == (void *)0 evaluates to false.
hide
|
|
| 81 | | | return; |
| 82 | | | |
| 83 | | | file_cache_set_fd(cache->file_cache, cache->fd); |
| 84 | | | |
| 85 | | | if (fstat(cache->fd, &st) == 0) |
Event 2:
fstat64() does not initialize st. - This may be because of a failure case or other special case for fstat64(). Consult the fstat64() documentation for more information.
hide
Event 3:
Taking false branch. fstat(cache->fd, &st) == 0 evaluates to false.
hide
|
|
| 86 | | | file_cache_set_size(cache->file_cache, st.st_size); |
| 87 | | | else if (errno != ESTALE)
x /usr/include/asm-generic/errno.h |
| |
89 | #define ESTALE 116 /* Stale NFS file handle */ |
| |
|
Event 4:
Skipping " if". errno != 116 evaluates to false.
hide
|
|
| 88 | | | mail_cache_set_syscall_error(cache, "fstat()"); |
| 89 | | | |
| 90 | | | cache->st_ino = st.st_ino; |
Uninitialized Variable
st was not initialized. The issue can occur if the highlighted code executes. See related event 2. Show: All events | Only primary events |
|
| |