projects
/
sent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b954ed4
)
Import arg.h OOB fix from Lucas Gabriel Vuotto.
author
Markus Teich
<markus.teich@stusta.mhn.de>
Sun, 6 Mar 2016 19:56:29 +0000
(20:56 +0100)
committer
Markus Teich
<markus.teich@stusta.mhn.de>
Sun, 6 Mar 2016 19:56:29 +0000
(20:56 +0100)
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.
arg.h
patch
|
blob
|
history
diff --git
a/arg.h
b/arg.h
index 4df77a701f443d2b9e91d90dd1a1405891986ff1..aeab52af9e374a0e97613cab8d124c92b14c4b0a 100644
(file)
--- a/
arg.h
+++ b/
arg.h
@@
-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_;\