]> git.eshelyaron.com Git - emacs.git/commit
bindat (strz): Write null terminator after variable length string
authorRichard Hansen <rhansen@rhansen.org>
Fri, 10 Jun 2022 00:41:50 +0000 (20:41 -0400)
committerEli Zaretskii <eliz@gnu.org>
Thu, 16 Jun 2022 06:55:49 +0000 (09:55 +0300)
commit6c3b6149d9e7c882729634dc5a7e647daeecfdf3
tree5690c2fcaec05edda7a42d4cbe6edc9fca1b7fe8
parentdcee64d4bf2751a6b67716e2e43267d9e73640cd
bindat (strz): Write null terminator after variable length string

* lisp/emacs-lisp/bindat.el (bindat--pack-strz): Explicitly write a
null byte after packing a variable-length string to ensure proper
termination when packing to a pre-allocated string.
* 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