1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00

Don't dereference a NULL pointer when we don't have a ':' in the

optarg of the -W option.  Instead, do the next best thing and give a
usage message.

Reported by: kris
This commit is contained in:
Warner Losh 2003-04-20 03:34:59 +00:00
parent 781a15a533
commit 1c2132626f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113738

View File

@ -460,6 +460,8 @@ main(int argc, char *argv[])
stringp = optarg;
ap = av;
*ap = strsep(&stringp, ":");
if (stringp == NULL)
usage(p);
ap++;
*ap = strsep(&stringp, ":");
mib = atoi(av[0]);