Bug#776096: bsdmainutils: hexdump fails if format_string contains backslash

2016-03-12 Thread Michael Meskes
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

Bug#776096: bsdmainutils: hexdump fails if format_string contains backslash

2016-03-11 Thread Rémi Rampin
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

Bug#776096: bsdmainutils: hexdump fails if format_string contains backslash

2015-09-04 Thread Rémi Rampin
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

Bug#776096: bsdmainutils: hexdump fails if format_string contains backslash

2015-09-04 Thread Rémi Rampin
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

Bug#776096: bsdmainutils: hexdump fails if format_string contains backslash

2015-09-04 Thread Sergey Romanov
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

Bug#776096: bsdmainutils: hexdump fails if format_string contains backslash

2015-09-03 Thread Rémi Rampin
This is a neat workaround, but I really wouldn't say that "it works".

Bug#776096: bsdmainutils: hexdump fails if format_string contains backslash

2015-09-03 Thread Sergey Romanov
Actually, it works. Try $ echo hello|hexdump -ve '"\\" /1 "x%02X"';printf \\n \x68\x65\x6C\x6C\x6F\x0A

Bug#776096: bsdmainutils: hexdump fails if format_string contains backslash

2015-01-23 Thread Remi Rampin
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