projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c45a50
)
libbb: getopt32() should not ever touch argv[0] (even read)
author
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 20 Aug 2008 00:15:42 +0000
(
00:15
-0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 20 Aug 2008 00:15:42 +0000
(
00:15
-0000)
libbb/getopt32.c
patch
|
blob
|
history
diff --git
a/libbb/getopt32.c
b/libbb/getopt32.c
index 611333c665254ab05ff56f05361a15610c711e17..54dc7857d40ef7fe2622f7c2221384a92cfafbe7 100644
(file)
--- a/
libbb/getopt32.c
+++ b/
libbb/getopt32.c
@@
-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++;