sent

Simple plaintext presentation tool
git clone https://git.sinitax.com/suckless/sent
Log | Files | Refs | README | LICENSE | sfeed.txt

commit c61e9a4b8a3eb2c08585c533dd727afa9608b9e4
parent b954ed4b9f1ef7e3d4ebb3bc964338726549bfab
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:
Marg.h | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

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_;\