dnstap-read: clear buffer before expanding it

When printing a packet, dnstap-read checks whether its text form takes
up more than the 2048 bytes allocated for the output buffer by default.
If that is the case, the output buffer is automatically expanded, but
the truncated output is left in the buffer, resulting in malformed data
being printed.  Clear the output buffer before expanding it to prevent
this issue from occurring.
This commit is contained in:
Michał Kępień
2019-06-28 12:12:46 +02:00
parent 1dfdedf137
commit 3549abe81d
5 changed files with 32 additions and 0 deletions

View File

@@ -558,7 +558,9 @@
./bin/tests/system/dnssec/signer/general/bogus-ksk.key X 2018,2019
./bin/tests/system/dnssec/signer/general/bogus-zsk.key X 2018,2019
./bin/tests/system/dnssec/tests.sh SH 2000,2001,2002,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019
./bin/tests/system/dnstap/README TXT.BRIEF 2019
./bin/tests/system/dnstap/clean.sh SH 2015,2016,2017,2018,2019
./bin/tests/system/dnstap/large-answer.fstrm X 2019
./bin/tests/system/dnstap/setup.sh SH 2018,2019
./bin/tests/system/dnstap/tests.sh SH 2015,2016,2017,2018,2019
./bin/tests/system/dnstap/ydump.py PYTHON 2016,2017,2018,2019