Subject: Re: bug#55952: [PATCH] bindat (strz): Write null terminator after variable length string

From: Eli Zaretskii <[email-masked]>
Date: Tue, 14 Jun 2022 15:52:02 +0300

> Cc: [email-masked]
> Date: Mon, 13 Jun 2022 17:48:15 -0400
> From: Richard Hansen <[email-masked]>
> 
> Attached patch:
> 
> * 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.

Thanks, but AFAICT the documentation doesn't describe accurately
enough what the modified code does: what if the pre-allocated
destination string doesn't have enough storage for the null byte the
code adds?