sam: prevent array overflow with multiple -i and -a arguments (thanks clsmith)
This commit is contained in:
parent
e20d7c4aad
commit
da689241d0
1 changed files with 4 additions and 0 deletions
|
@ -63,9 +63,13 @@ void main(int argc, char *argv[])
|
|||
/* options for samterm */
|
||||
case 'a':
|
||||
*ap++ = "-a";
|
||||
if(ap >= termargs+nelem(termargs))
|
||||
usage();
|
||||
break;
|
||||
case 'i':
|
||||
*ap++ = "-i";
|
||||
if(ap >= termargs+nelem(termargs))
|
||||
usage();
|
||||
break;
|
||||
}ARGEND
|
||||
*ap = nil;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue