Import arg.h OOB fix from Lucas Gabriel Vuotto. - sent - simple plaintext presentation tool
HTML git clone git://git.suckless.org/sent
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit c61e9a4b8a3eb2c08585c533dd727afa9608b9e4
DIR parent b954ed4b9f1ef7e3d4ebb3bc964338726549bfab
HTML Author: Markus Teich <markus.teich@stusta.mhn.de>
Date: Sun, 6 Mar 2016 20:56:29 +0100
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.
Diffstat:
M arg.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
DIR diff --git 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_;\