(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/util/idxview.c) |
| |
| 37 | | | static const char *unixdate2str(time_t timestamp) |
| 38 | | | { |
| 39 | | | static char buf[64]; |
| 40 | | | struct tm *tm; |
| 41 | | | |
| 42 | | | tm = localtime(×tamp); |
Event 1:
localtime() returns NULL. - Dereferenced later, causing the null pointer dereference.
hide
Event 2:
tm is set to localtime(×tamp), which evaluates to NULL. See related event 1.
hide
|
|
| 43 | | | strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", tm); |
Event 3:
tm, which evaluates to NULL, is passed to strftime() as the fourth argument. See related event 2.
hide
Null Pointer Dereference
The body of strftime() dereferences tm, but it is NULL. The issue can occur if the highlighted code executes. See related event 3. Show: All events | Only primary events |
|
| |