(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/imap/main.c) |
| |
| 99 | | | static void open_logfile(void) |
| 100 | | | { |
| 101 | | | const char *user; |
| 102 | | | |
| 103 | | | if (getenv("LOG_TO_MASTER") != NULL) { |
Event 1:
Skipping " if". getenv(...) != (void *)0 evaluates to false.
hide
|
|
| 104 | | | i_set_failure_internal(); |
| 105 | | | return; |
| 106 | | | } |
| 107 | | | |
| 108 | | | if (getenv("LOG_PREFIX") != NULL) |
Event 2:
Taking true branch. getenv(...) != (void *)0 evaluates to true.
hide
|
|
| 109 | [+] | | i_strocpy(log_prefix, getenv("LOG_PREFIX"), sizeof(log_prefix)); |
Event 3:
getenv() returns NULL. - Dereferenced later, causing the null pointer dereference.
hide
Event 4:
getenv("LOG_PREFIX"), which evaluates to NULL, is passed to i_strocpy() as the second argument. See related event 3.
hide
|
|
 |
| |