]> git.eshelyaron.com Git - emacs.git/commit
bindat (strz): Null terminate fixed-length strings if there is room
authorRichard Hansen <rhansen@rhansen.org>
Thu, 16 Jun 2022 19:21:57 +0000 (15:21 -0400)
committerEli Zaretskii <eliz@gnu.org>
Wed, 22 Jun 2022 13:55:40 +0000 (16:55 +0300)
commit55c2102560751ae05c98fd04120abcf4595d2a57
treefefaefc7181a31eb469e2e14ed9d12d80ad45764
parenteff42dc0af741cc56c52d7d9577d29fc16f9f665
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 (bug#56048).
* doc/lispref/processes.texi (Bindat Types): Update documentation.
* test/lisp/emacs-lisp/bindat-tests.el (bindat-test--str-strz-prealloc):
Update tests.
doc/lispref/processes.texi
lisp/emacs-lisp/bindat.el
test/lisp/emacs-lisp/bindat-tests.el