(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/auth-process.c) |
| |
| 616 | | | static int create_auth_worker(struct auth_process *process, int fd) |
| 617 | | | { |
| 618 | | | struct log_io *log; |
| 619 | | | const char *prefix, *executable; |
| 620 | | | pid_t pid; |
| 621 | | | int log_fd, i; |
| 622 | | | |
| 623 | [+] | | log_fd = log_create_pipe(&log, 0); |
 |
| 624 | | | if (log_fd < 0) |
Event 4:
Taking true branch. log_fd < 0 evaluates to true.
hide
|
|
| 625 | | | pid = -1; |
| 626 | | | else { |
| 627 | | | pid = fork(); |
| 628 | | | if (pid < 0) |
| 629 | | | i_error("fork() failed: %m"); |
| 630 | | | } |
| 631 | | | |
| 632 | | | if (pid < 0) { |
Event 5:
Taking true branch. pid < 0 evaluates to true.
hide
|
|
| 633 | | | (void)close(log_fd); |
Event 6:
log_fd, which evaluates to -1, is passed to close(). See related event 3.
hide
Negative file descriptor
File descriptor argument log_fd has value -1. - close() will fail when called with a negative file descriptor.
The issue can occur if the highlighted code executes. See related event 6. Show: All events | Only primary events |
|
| |