binary decode hex loses a byte in a file with whitespaces
Closed / Fixedb98fa55285ce197ef7bd119e4e937b78be77af4aCreated 13 years agoUpdated 13 years ago
Descriptionplain2013-07-05 03:54:24
The attached hex string has a few whitespaces in it. Notice that it ends with two bytes: 0000. However, after passing this string to 'binary decode hex', the last 00 bytes gets lost in my machine. It is always reproducible. If I remove the whitespaces (including line endings) from the string, this doesn't happen: I get the two 00 bytes at the end (expected behavior).
Referenced by1
3534dc020d[b98fa55285]: Fix handling of whitespace at end of hex strings to decode. check-in2013-09-01 20:08:50
anonymous Ticket [b98fa55285]: 3 changes
[History diff]2013-07-05 03:55:08
dgpplain2013-07-05 18:56:15
passing to one of the [binary] maintainers.
dkf Ticket [b98fa55285]: 3 changes
[History diff]2013-08-21 09:43:28
dkfwiki2013-09-01 20:10:08
The problem was whitespace at the end of the string to decode. I think. I found that I could duplicate the problem with much smaller strings too.
Log in (anonymous is fine) to add a comment.