]> granicus.if.org Git - strace/commit
printstr_ex: fix handling of last byte when QUOTE_0_TERMINATED bit set
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 20 Nov 2016 00:29:46 +0000 (00:29 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 20 Nov 2016 00:29:46 +0000 (00:29 +0000)
commit52b85c6fdfad963affca6699bff4437fbfab01e2
treed03c03a80a80eb3ee1be47ebe4d6ef94ea5c7eef
parent03d65a05b9f31b26573a8282d2da9f15c602a6cd
printstr_ex: fix handling of last byte when QUOTE_0_TERMINATED bit set

* util.c (printstr_ex): Simplify handling of size == 0 case.
Do not artificially decrement size when QUOTE_0_TERMINATED bit is set.
Ensure that str[size] byte is non-zero if it hasn't been fetched.
util.c