1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

avoid coredump when ther;s only one token on a line; ok millert@

This commit is contained in:
otto 2007-11-06 14:39:19 +00:00
parent 1717b5a37e
commit bf3eb731fd

View File

@ -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);