diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-09-30 16:37:04 +0200 |
---|---|---|
committer | Johannes Berg <johannes@sipsolutions.net> | 2009-09-30 16:37:12 +0200 |
commit | 771fe630d71993b9d270a9a6145ecaa8510c4f1c (patch) | |
tree | 0d6b002ec71050e19a1ed9003f1e895cd40b2899 | |
parent | 1e33710fe67026f5e2c889020ce8549badf5aa8c (diff) | |
download | dovecot-antispam-771fe630d71993b9d270a9a6145ecaa8510c4f1c.tar.gz dovecot-antispam-771fe630d71993b9d270a9a6145ecaa8510c4f1c.tar.xz dovecot-antispam-771fe630d71993b9d270a9a6145ecaa8510c4f1c.zip |
check return value of pipe()
(part of a patch from Andreas Schneider)
-rw-r--r-- | dspam-exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dspam-exec.c b/dspam-exec.c index 3c52271..ecfb9f1 100644 --- a/dspam-exec.c +++ b/dspam-exec.c @@ -58,7 +58,8 @@ static int call_dspam(const char *signature, enum classification wanted) * non-zero exit code on errors so we treat it as an error * if it logged anything to stderr. */ - pipe(pipes); + if (pipe(pipes) < 0) + return -1; pid = fork(); if (pid < 0) |