(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/util/rawlog.c) |
| |
| 275 | | | static void rawlog_open(enum rawlog_flags flags) |
| 276 | | | { |
| 277 | | | const char *chroot_dir, *home, *path; |
| 278 | | | struct stat st; |
| 279 | | | int sfd[2]; |
| 280 | | | pid_t pid; |
| 281 | | | |
| 282 | | | chroot_dir = getenv("RESTRICT_CHROOT"); |
| 283 | | | home = getenv("HOME"); |
| 284 | | | if (chroot_dir != NULL) |
Event 1:
Taking true branch. chroot_dir != (void *)0 evaluates to true.
hide
|
|
| 285 | | | home = t_strconcat(chroot_dir, home, NULL); |
| 286 | | | else if (home == NULL) |
| 287 | | | home = "."; |
| 288 | | | |
| 289 | | | |
| 290 | [+] | | path = t_strconcat(home, "/dovecot.rawlog", NULL); |
 |
| 291 | | | if (lstat(path, &st) < 0) { |
Event 8:
path, which evaluates to NULL, is passed to lstat64() as the first argument. See related event 7.
hide
Null Pointer Dereference
The body of lstat64() dereferences path, but it is NULL. The issue can occur if the highlighted code executes. See related event 8. Show: All events | Only primary events |
|
| |