[PATCH] pretty: fix buffer over-read with %> and %

2017-11-28 Thread mwnx
A buffer over-read of the format string would occur with unterminated formats of the form '%>(#' and '%<(#', where '#' represents a number. This error can be witnessed by running git log under valgrind like so: valgrind git log -n1 --format='%<(42' This was due to the fact that the "not

Re: [PATCH] pretty: fix buffer over-read with %> and %

2017-11-27 Thread mwnx
is patch any other way, I guess I'll comply. What are your thoughts on this issue? -- mwnx GPG: AEC9 554B 07BD F60D 75A3 AF6A 44E8 E4D4 0312 C726

[PATCH] pretty: fix buffer over-read with %> and %

2017-11-25 Thread mwnx
s search (which will be a '\0' if unsuccessful). Signed-off-by: mwnx <m...@gmx.com> --- pretty.c | 2 +- t/t4205-log-pretty-formats.sh | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pretty.c b/pretty.c index 2f6b0ae6c..4c70bad45 100644 --- a