GNU bug report logs - #55719
29.0.50; various bindat strz bugs

Previous Next

Package: emacs;

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


View this message in rfc822 format

From: Richard Hansen <rhansen <at> rhansen.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 55719 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca, emacs-devel <at> gnu.org
Subject: bug#55719: [PATCH] bindat strz fixes
Date: Tue, 31 May 2022 16:08:18 -0400
[Message part 1 (text/plain, inline)]
On 5/31/22 07:08, Eli Zaretskii wrote:
> Can you tell why you are convinced the null byte should be considered
> as part of the string?

The null terminator is the reason one would use the strz type. If the
user doesn't want a null terminator, they should use the str type
instead. From the documentation [1]:

> str len
>
>     String of bytes of length len.
>
> strz &optional len
>
>     Zero-terminated string of bytes, can be of arbitrary length or 
>     in a fixed-size field with length len.

[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Bindat-Types.html#index-bindat_002dtype
[OpenPGP_signature (application/pgp-signature, attachment)]

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.