Check if username is a NULL pointer before dereferencing it.

This commit is contained in:
Martin Renters 1996-07-03 21:43:48 +00:00
parent a3341c6330
commit ca7c8034d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=16946

View File

@ -125,7 +125,7 @@ main(argc, argv)
argc -= optind;
argv += optind;
if (argc != 1 || *username == '+' || *username == '-')
if (argc != 1 || (username && (*username == '+' || *username == '-')))
usage();
/*