[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not r
From: |
Federico Tedin |
Subject: |
bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable |
Date: |
Wed, 15 Sep 2021 00:17:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Ok! Here's my first try at this. I ended up skipping the check on
DEFAULT-DIRECTORY since as you mentioned, its value is used with
expand-file-name itself. In the other case, if default-directory is
picked up, then I checked the value of that variable.
expand-file-name.patch
Description: patch
Eli Zaretskii <eliz@gnu.org> writes:
>> 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.
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Federico Tedin, 2021/09/14
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Eli Zaretskii, 2021/09/14
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable,
Federico Tedin <=
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Eli Zaretskii, 2021/09/16
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Federico Tedin, 2021/09/16
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Michael Albinus, 2021/09/16
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Eli Zaretskii, 2021/09/16
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Michael Albinus, 2021/09/16
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Eli Zaretskii, 2021/09/16
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Federico Tedin, 2021/09/16
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Michael Albinus, 2021/09/16
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Federico Tedin, 2021/09/16
- bug#49723: 28.0.50; Test in coding.c for NUL bytes in filenames is not reliable, Michael Albinus, 2021/09/20