← Commit list

4301616b2

Denis Vlasenko
Denis Vlasenko
2008-08-20
FAILED Duration: 31s

Subject

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

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/getopt32.c+2 -1
@@ -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++;