Import arg.h OOB fix from Lucas Gabriel Vuotto.
This is a small fix for arg.h where it's possible to perform an out-of-boundary memory access in argv's internal string.
This commit is contained in:
parent
b954ed4b9f
commit
c61e9a4b8a
4
arg.h
4
arg.h
@ -10,8 +10,8 @@ extern char *argv0;
|
|||||||
|
|
||||||
/* use main(int argc, char *argv[]) */
|
/* use main(int argc, char *argv[]) */
|
||||||
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
|
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
|
||||||
argv[0] && argv[0][1]\
|
argv[0] && argv[0][0] == '-'\
|
||||||
&& argv[0][0] == '-';\
|
&& argv[0][1];\
|
||||||
argc--, argv++) {\
|
argc--, argv++) {\
|
||||||
char argc_;\
|
char argc_;\
|
||||||
char **argv_;\
|
char **argv_;\
|
||||||
|
Loading…
Reference in New Issue
Block a user