libbb: getopt32() should not ever touch argv[0] (even read)

1_12_stable
Denis Vlasenko 2008-08-20 00:15:42 +00:00
parent 1c45a505eb
commit 4301616b27
1 changed files with 2 additions and 1 deletions

View File

@ -338,7 +338,8 @@ getopt32(char **argv, const char *applet_opts, ...)
int spec_flgs = 0;
argc = 0;
/* skip 0: some applets cheat: they do not actually HAVE argv[0] */
argc = 1;
while (argv[argc])
argc++;