[hackers] [sent] Import arg.h OOB fix from Lucas Gabriel Vuotto. || Markus Teich

From: <git_AT_suckless.org>
Date: Sun, 6 Mar 2016 20:58:11 +0100 (CET)

commit c61e9a4b8a3eb2c08585c533dd727afa9608b9e4
Author: Markus Teich <markus.teich_AT_stusta.mhn.de>
AuthorDate: Sun Mar 6 20:56:29 2016 +0100
Commit: Markus Teich <markus.teich_AT_stusta.mhn.de>
CommitDate: Sun Mar 6 20:56:29 2016 +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.

diff --git a/arg.h b/arg.h
index 4df77a7..aeab52a 100644
--- a/arg.h
+++ b/arg.h
_AT_@ -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_;\
Received on Sun Mar 06 2016 - 20:58:11 CET

This archive was generated by hypermail 2.3.0 : Sun Mar 06 2016 - 21:00:22 CET