From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10997 invoked from network); 24 Nov 2020 14:36:15 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 24 Nov 2020 14:36:15 -0000 Received: (qmail 11614 invoked by uid 550); 24 Nov 2020 14:36:12 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 11596 invoked from network); 24 Nov 2020 14:36:11 -0000 Date: Tue, 24 Nov 2020 09:35:55 -0500 From: Rich Felker To: Alexey Izbyshev Cc: musl@lists.openwall.com Message-ID: <20201124143555.GC534@brightrain.aerifal.cx> References: <20201122225619.GR534@brightrain.aerifal.cx> <97dd3cf7c69673e5962e9ccd46ea5131@ispras.ru> <20201123031932.GS534@brightrain.aerifal.cx> <20201123185633.GY534@brightrain.aerifal.cx> <20201123205259.GZ534@brightrain.aerifal.cx> <48faf5ab9a1f3c869c85897217db0d75@ispras.ru> <20201124042646.GA534@brightrain.aerifal.cx> <20201124063048.GB534@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] 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