(/home/sate/Testcases/c/cve/dovecot-1.2.0/src/master/ssl-init.c) |
| |
| 28 | | | static void start_generate_process(const char *fname) |
| 29 | | | { |
| 30 | | | const char *binpath = PKG_LIBEXECDIR"/ssl-build-param"; |
| 31 | | | struct log_io *log; |
| 32 | | | pid_t pid; |
| 33 | | | int log_fd; |
| 34 | | | |
| 35 | [+] | | log_fd = log_create_pipe(&log, 10); |
 |
| 36 | | | if (log_fd == -1) |
Event 4:
Taking true branch. log_fd == -1 evaluates to true.
hide
|
|
| 37 | | | pid = -1; |
| 38 | | | else { |
| 39 | | | pid = fork(); |
| 40 | | | if (pid < 0) |
| 41 | | | i_error("fork() failed: %m"); |
| 42 | | | } |
| 43 | | | if (pid == -1) { |
Event 5:
Taking true branch. pid == -1 evaluates to true.
hide
|
|
| 44 | | | (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 |
|
| |