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:
Markus Teich 2016-03-06 20:56:29 +01:00
parent b954ed4b9f
commit c61e9a4b8a

4
arg.h
View File

@ -10,8 +10,8 @@ extern char *argv0;
/* use main(int argc, char *argv[]) */
#define ARGBEGIN for (argv0 = *argv, argv++, argc--;\
argv[0] && argv[0][1]\
&& argv[0][0] == '-';\
argv[0] && argv[0][0] == '-'\
&& argv[0][1];\
argc--, argv++) {\
char argc_;\
char **argv_;\