On Fri, Mar 11, 2016 at 10:51:21AM -0500, Rémi Rampin wrote:
> Just a reminder that there is still a severe and obvious logic error in the
> escape() for loop. I uploaded a patch to fix it 6 months ago. The new
> version you uploaded still exhibits the same bugs.
Sorry, completely missed it. Might
Just a reminder that there is still a severe and obvious logic error in the
escape() for loop. I uploaded a patch to fix it 6 months ago. The new
version you uploaded still exhibits the same bugs.
Regards
There's actually another bug in escape(): the terminating null byte
doesn't break out of the loop if the last character is a backslash.
You can't see the garbage that gets copied to the buffer because the
null byte gets copied, the the overrun does happen.
New patch that also addresses that.
--- b
Nevermind, I found the bug in the source. It actually fumbles if the
backslash *isn't the last character in the format unit*.
New patch attached, fixes up escape() in hexdump/parse.c
I don't know if there is an upstream to report this to, but other
distributions are affected.
--- bsdmainutils/usr
I think this workaround warrants a mention in the manpage. I adjusted
an example in debian/patches/hexdump_man.diff accordingly, see the
attachment.
Maybe it should also say somewhere that in order to output a literal
backslash it must be put onto a separate format unit.
Description: Add examples
This is a neat workaround, but I really wouldn't say that "it works".
Actually, it works. Try
$ echo hello|hexdump -ve '"\\" /1 "x%02X"';printf \\n
\x68\x65\x6C\x6C\x6F\x0A
Package: bsdmainutils
Version: 9.0.6
Severity: important
Tags: upstream
Dear Maintainer,
I was trying to get hexdump to output a C-string with hexadecimal escapes,
like "\x68\x65\x6C\x6C\x6F\x0A". Not only did I never reach that result, but
I also run into error messages that don't appear to make
8 matches
Mail list logo