aboutsummaryrefslogtreecommitdiff
path: root/mailutils
diff options
context:
space:
mode:
Diffstat (limited to 'mailutils')
-rw-r--r--mailutils/mime.c2
-rw-r--r--mailutils/sendmail.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/mailutils/mime.c b/mailutils/mime.c
index dd81139f2..17d0f9d80 100644
--- a/mailutils/mime.c
+++ b/mailutils/mime.c
@@ -293,7 +293,7 @@ static int parse(const char *boundary, char **argv)
}
// parent dumps to fd[1]
close(fd[0]);
- fp = fdopen(fd[1], "w");
+ fp = xfdopen_for_write(fd[1]);
signal(SIGPIPE, SIG_IGN); // ignore EPIPE
// or create a file for dump
} else {
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index 2f99df6c0..4b58a78eb 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -93,7 +93,7 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv)
// save initial stdin since body is piped!
xdup2(STDIN_FILENO, 3);
- G.fp0 = fdopen(3, "r");
+ G.fp0 = xfdopen_for_read(3);
// parse options
// -f is required. -H and -S are mutually exclusive