GNU bug report logs - #56048
[PATCH] bindat (strz): Null terminate fixed-length strings if there is room

Previous Next

Package: emacs;

Reported by: Richard Hansen <rhansen <at> rhansen.org>

Date: Fri, 17 Jun 2022 22:54:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.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: 56048 <at> debbugs.gnu.org
Cc: monnier <at> iro.umontreal.ca
Subject: bug#56048: [PATCH] bindat (strz): Null terminate fixed-length strings if there is room
Date: Fri, 17 Jun 2022 18:52:51 -0400
[Message part 1 (text/plain, inline)]
X-Debbugs-CC: monnier <at> iro.umontreal.ca

Two patches attached:

Patch 1:

    ; bindat (strz): Move all pack logic to pack function

Patch 2:

    bindat (strz): Null terminate fixed-length strings if there is room

    * lisp/emacs-lisp/bindat.el (bindat--pack-strz): For fixed-length strz
    fields, explicitly write a null terminator after the packed string if
    there is room.
    * doc/lispref/processes.texi (Bindat Types): Update documentation.
    * test/lisp/emacs-lisp/bindat-tests.el (bindat-test--str-strz-prealloc):
    Update tests.
[0001-bindat-strz-Move-all-pack-logic-to-pack-function.patch (text/x-patch, attachment)]
[0002-bindat-strz-Null-terminate-fixed-length-strings-if-t.patch (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

This bug report was last modified 3 years and 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.