]> granicus.if.org Git - strace/commit
printstr_ex: fix decoding of non-NUL-terminated strings when len == -1
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 24 Dec 2016 17:35:40 +0000 (17:35 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 25 Dec 2016 11:32:45 +0000 (11:32 +0000)
commita3c2e4e20b08e546201c267fa47aa2b96b507eae
tree395eb99768b5cad272b5d01c32d077dff123d637
parent9af28a4d1313ffb1f5ef57a352ba77070b0977e1
printstr_ex: fix decoding of non-NUL-terminated strings when len == -1

Do not treat len == -1 in any special way.  All users who need the
string to be handled as a NUL-terminated string set QUOTE_0_TERMINATED
bit in user_style flags already.

* util.c (printstr_ex): Remove (len == -1) check.
* tests/printstr.c: New file.
* tests/printstr.test: New test.
* tests/.gitignore: Add printstr.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add printstr.test.
tests/.gitignore
tests/Makefile.am
tests/printstr.c [new file with mode: 0644]
tests/printstr.test [new file with mode: 0755]
util.c