GNU bug report logs -
#55719
29.0.50; various bindat strz bugs
Previous Next
Reported by: Richard Hansen <rhansen <at> rhansen.org>
Date: Mon, 30 May 2022 06:48:02 UTC
Severity: normal
Tags: patch
Found in version 29.0.50
Done: Richard Hansen <rhansen <at> rhansen.org>
Bug is archived. No further changes may be made.
Full log
Message #31 received at 55719 <at> debbugs.gnu.org (full text, mbox):
On 6/1/22 16:23, Richard Hansen wrote:
> Anyone that needs the current behavior should be using `str N`, not
> `strz N`. If they're using `strz N`, then I would consider that to be
> a bug in their code. If this change breaks someone, they can fix it
> easily: just change `strz N` to `str N`. I understand that we should
> endeavor to maintain compatibility, but keeping the current behavior
> would be intentionally preserving a bug to accommodate other bugs. I
> don't think that's a good trade-off.
Actually I'm wrong; there is a difference between `str N` and `strz N`. With `str N`, all zero bytes in the input string are included in the unpacked value (including trailing null bytes). With `strz N`, the unpacked string ends just before the first zero byte.
I'll remove the `strz N` change from the patch series so that we can get the rest merged.
This bug report was last modified 2 years and 351 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.