develooper Front page | perl.perl5.porters | Postings from August 2017

[perl #131895] stat() doesn't fail on filenames containing \0 / NUL

Thread Next
From:
Tony Cook via RT
Date:
August 21, 2017 05:02
Subject:
[perl #131895] stat() doesn't fail on filenames containing \0 / NUL
Message ID:
rt-4.0.24-15642-1503291712-1218.131895-15-0@perl.org
On Mon, 14 Aug 2017 13:39:41 -0700, mauke- wrote:
> $ perl -wE 'stat ".\0-" or die $!'
> $
> 
> stat() returns success even though there is no file called ".\0-" on
> my system
> (because \0 is not valid in a file name). I would have expected a "No
> such file
> or directory" error (ENOENT), just like with open().

How about the attached?

Tony

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=131895

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About