summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mailwrapper
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2007-11-06 14:39:19 +0000
committerotto <otto@openbsd.org>2007-11-06 14:39:19 +0000
commitbf3eb731fd5a81ee7c7b7d24d78b5fa2e1680022 (patch)
treef9dc7b0970b99e62b2a96e858e2a18b08126f293 /usr.sbin/mailwrapper
parentfix format string (diff)
downloadwireguard-openbsd-bf3eb731fd5a81ee7c7b7d24d78b5fa2e1680022.tar.xz
wireguard-openbsd-bf3eb731fd5a81ee7c7b7d24d78b5fa2e1680022.zip
avoid coredump when ther;s only one token on a line; ok millert@
Diffstat (limited to 'usr.sbin/mailwrapper')
-rw-r--r--usr.sbin/mailwrapper/mailwrapper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/mailwrapper/mailwrapper.c b/usr.sbin/mailwrapper/mailwrapper.c
index d8e1deb2319..362b67da0fd 100644
--- a/usr.sbin/mailwrapper/mailwrapper.c
+++ b/usr.sbin/mailwrapper/mailwrapper.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mailwrapper.c,v 1.17 2007/09/02 15:19:39 deraadt Exp $ */
+/* $OpenBSD: mailwrapper.c,v 1.18 2007/11/06 14:39:19 otto Exp $ */
/* $NetBSD: mailwrapper.c,v 1.2 1999/02/20 22:10:07 thorpej Exp $ */
/*
@@ -125,7 +125,7 @@ main(int argc, char *argv[], char *envp[])
continue;
}
- if ((from = strsep(&cp, WS)) == NULL)
+ if ((from = strsep(&cp, WS)) == NULL || cp == NULL)
goto parse_error;
cp += strspn(cp, WS);