diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-08-20 00:15:42 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-08-20 00:15:42 +0000 |
commit | 4301616b27afa808eeb8ea619dd7f3f9fa540462 (patch) | |
tree | 9fb78f2585aa069010e6d7019f471518bc866f39 /libbb | |
parent | 1c45a505eb109af13e5399c2b016acec4ad10421 (diff) | |
download | busybox-w32-4301616b27afa808eeb8ea619dd7f3f9fa540462.tar.gz busybox-w32-4301616b27afa808eeb8ea619dd7f3f9fa540462.tar.bz2 busybox-w32-4301616b27afa808eeb8ea619dd7f3f9fa540462.zip |
libbb: getopt32() should not ever touch argv[0] (even read)
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/getopt32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c index 611333c66..54dc7857d 100644 --- a/libbb/getopt32.c +++ b/libbb/getopt32.c | |||
@@ -338,7 +338,8 @@ getopt32(char **argv, const char *applet_opts, ...) | |||
338 | 338 | ||
339 | int spec_flgs = 0; | 339 | int spec_flgs = 0; |
340 | 340 | ||
341 | argc = 0; | 341 | /* skip 0: some applets cheat: they do not actually HAVE argv[0] */ |
342 | argc = 1; | ||
342 | while (argv[argc]) | 343 | while (argv[argc]) |
343 | argc++; | 344 | argc++; |
344 | 345 | ||