readdir() returns inaccessible name if file was created with invalid UTF-8
Christian Franke
Christian.Franke@t-online.de
Sat Jul 5 15:19:58 GMT 2025
Jon Turney via Cygwin wrote:
> On 26/06/2025 18:07, Christian Franke via Cygwin wrote:
>> Corinna Vinschen via Cygwin wrote:
>>> On Jun 25 16:59, Christian Franke via Cygwin wrote:
>>>> On 2024年9月15日 19:47:11 +0200, Christian Franke wrote:
>>>>> If a file name contains an invalid (truncated) UTF-8 sequence, open()
>>>>> does not refuse to create the file. Later readdir() returns a
>>>>> different
>>>>> name which could not be used to access the file.
>>>>>> [...]
>>>> Testcase: enable one of the "DON'T DO THIS" lines and make sure that
>> a suitable file removal tool is available :-)
>> Christian,
>> I think you should already have push access to the stc repository I
> setup [1], which is now run as part of the CI to check for regressions.
>> If you think it's useful, please consider adding this (or any of the
> other STCs you've very helpfully put together) to that.
Added broken/random_filenames.c and fortify/realloc_fortify_3.c for now.
I will look for more...
--
Regards,
Christian
More information about the Cygwin
mailing list