Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201124143555.GC534@brightrain.aerifal.cx>
Date: Tue, 24 Nov 2020 09:35:55 -0500
From: Rich Felker <dalias@...c.org>
To: Alexey Izbyshev <izbyshev@...ras.ru>
Cc: musl@...ts.openwall.com
Subject: Re: realpath without procfs -- should be ready for inclusion

On Tue, Nov 24, 2020 at 12:21:36PM +0300, Alexey Izbyshev wrote:
> On 2020-11-24 09:30, Rich Felker wrote:
> >I think before this goes upstream we should have a good set of
> >testcases that can be contributed to libc-test. Do you have ideas for
> >coverage? Some that come to mind:
> >
> Added some more ideas.
> 
> [...]
> - An argument ending with an absolute symlink with the target having
> length PATH_MAX-1 (valid path)
> 
> Hm, the last one doesn't work now. Since p is the position of NUL
> instead of the size of stack, "if (k==p) goto toolong;" forbids
> symlinks with the length of the target == PATH_MAX-1.

This should be fixable just by increasing size of stack to PATH_MAX+1.
In theory it doesn't need to be null-terminated but then strchrnul
won't work. memchr would work instead but it's slightly less
convenient to use.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.