all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Federico Tedin <federicotedin@gmail.com>
Cc: phst@google.com, 49723@debbugs.gnu.org
Subject: bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable
Date: Tue, 14 Sep 2021 22:24:22 +0300	[thread overview]
Message-ID: <8335q7c655.fsf@gnu.org> (raw)
In-Reply-To: <87pmtbj81v.fsf@gmail.com> (message from Federico Tedin on Tue, 14 Sep 2021 21:01:16 +0200)

> From: Federico Tedin <federicotedin@gmail.com>
> Cc: 49723@debbugs.gnu.org,  Philipp Stephani <phst@google.com>
> Date: Tue, 14 Sep 2021 21:01:16 +0200
> 
> I'm interested in looking into this one since I want to learn more about
> the C side of the codebase. However, I wasn't able to find a call to
> expand-file-name in encode_file_name or encode_file_name_1. I did find
> the null byte check though (CHECK_TYPE + memchr). Maybe I am missing
> something out.

My description was inaccurate: the expand-file-name call usually
precedes the call to ENCODE_FILE, it is not part of encode_file_name.

> I assume that a similar check on expand-file-name should be applied to
> both input arguments, NAME and DEFAULT-DIRECTORY?

I don't think we need that because expand-file-name calls itself on
DEFAULT-DIRECTORY internally.  But we may need to perform the check on
default-directory, if we use it inside expand-file-name.





  reply	other threads:[~2021-09-14 19:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 17:39 bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable Eli Zaretskii
2021-09-14 19:01 ` Federico Tedin
2021-09-14 19:24   ` Eli Zaretskii [this message]
2021-09-14 22:17     ` Federico Tedin
2021-09-16 12:25       ` Eli Zaretskii
2021-09-16 16:58         ` Federico Tedin
2021-09-16 18:12           ` Michael Albinus
2021-09-16 18:30             ` Eli Zaretskii
2021-09-16 18:44               ` Michael Albinus
2021-09-16 19:07                 ` Eli Zaretskii
2021-09-16 18:38             ` Federico Tedin
2021-09-16 18:51               ` Michael Albinus
2021-09-16 19:13                 ` Federico Tedin
2021-09-20 11:59                   ` Michael Albinus
2021-09-17  7:49           ` Eli Zaretskii
2021-09-17 19:00             ` Federico Tedin
2021-09-18  6:51               ` Eli Zaretskii
2021-09-18 17:57                 ` Federico Tedin

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=8335q7c655.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=49723@debbugs.gnu.org \
    --cc=federicotedin@gmail.com \
    --cc=phst@google.com \
    /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.