From 1890d59905414ab84a35892b2e45833654aa5c13 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Sat, 11 Mar 2017 10:59:34 +0100 Subject: tool_writeout: fixed a buffer read overrun on --write-out If a % ended the statement, the string's trailing NUL would be skipped and memory past the end of the buffer would be accessed and potentially displayed as part of the --write-out output. Added tests 1440 and 1441 to check for this kind of condition. Reported-by: Brian Carpenter --- tests/data/test1440 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tests/data/test1440 (limited to 'tests/data/test1440') diff --git a/tests/data/test1440 b/tests/data/test1440 new file mode 100644 index 000000000..7ed0c4d5f --- /dev/null +++ b/tests/data/test1440 @@ -0,0 +1,31 @@ + + + +--write-out + + +# Server-side + + + +# Client-side + + +file + + + +Check --write-out with trailing %{ + + +file://localhost/%PWD/log/ --write-out '%{' + + + +# Verify data + + +%{ + + + -- cgit v1.2.3