all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Richard Hansen <rhansen@rhansen.org>
Cc: 55952@debbugs.gnu.org, monnier@iro.umontreal.ca
Subject: bug#55952: [PATCH] bindat (strz): Write null terminator after variable length string
Date: Tue, 14 Jun 2022 15:52:02 +0300	[thread overview]
Message-ID: <834k0ntnkd.fsf@gnu.org> (raw)
In-Reply-To: <95d2ffc9-ac61-91fa-605e-f95507f81217@rhansen.org> (message from Richard Hansen on Mon, 13 Jun 2022 17:48:15 -0400)

> Cc: monnier@iro.umontreal.ca
> Date: Mon, 13 Jun 2022 17:48:15 -0400
> From: Richard Hansen <rhansen@rhansen.org>
> 
> 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?





  reply	other threads:[~2022-06-14 12:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 21:48 bug#55952: [PATCH] bindat (strz): Write null terminator after variable length string Richard Hansen
2022-06-14 12:52 ` Eli Zaretskii [this message]
2022-06-14 20:47   ` Richard Hansen
2022-06-15 12:16     ` Eli Zaretskii
2022-06-15 18:49       ` Richard Hansen
2022-06-16  7:15         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=834k0ntnkd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=55952@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rhansen@rhansen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.