-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
4 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<testcase> | ||
<info> | ||
<keywords> | ||
--write-out | ||
</keywords> | ||
</info> | ||
# Server-side | ||
<reply> | ||
</reply> | ||
|
||
# Client-side | ||
<client> | ||
<server> | ||
file | ||
</server> | ||
|
||
<name> | ||
Check --write-out with trailing %{ | ||
</name> | ||
<command> | ||
file://localhost/%PWD/log/ --write-out '%{' | ||
</command> | ||
</client> | ||
|
||
# Verify data | ||
<verify> | ||
<stdout nonewline="yes"> | ||
%{ | ||
</stdout> | ||
</verify> | ||
</testcase> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<testcase> | ||
<info> | ||
<keywords> | ||
--write-out | ||
</keywords> | ||
</info> | ||
# Server-side | ||
<reply> | ||
</reply> | ||
|
||
# Client-side | ||
<client> | ||
<server> | ||
file | ||
</server> | ||
|
||
<name> | ||
Check --write-out with trailing % | ||
</name> | ||
<command> | ||
file://localhost/%PWD/log/ --write-out '%' | ||
</command> | ||
</client> | ||
|
||
# Verify data | ||
<verify> | ||
<stdout nonewline="yes"> | ||
% | ||
</stdout> | ||
</verify> | ||
</testcase> |