Skip to content
Snippets Groups Projects
Commit 503e00c3 authored by deuce's avatar deuce
Browse files

Prevent crash (NULL-dereference) on invalid syntax (ie: -S50)

parent 4795b56d
No related branches found
No related tags found
No related merge requests found
......@@ -173,6 +173,10 @@ int main(int argc, char **argv)
for(i=first_arg;i<argc;i++) {
if(argv[i][0]=='-') {
if(argv[i+1]==NULL) {
printf("%s",usage);
return(1);
}
switch(toupper(argv[i++][1])) {
case 'A':
SAFECOPY(user.address,argv[i]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment