|
Message-ID: <20220516100728.qnhevnlw7f3rufc6@eve>
Date: Mon, 16 May 2022 10:07:28 +0000
From: Alyssa Ross <hi@...ssa.is>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH musl v2 3/3] mntent: fix parsing lines with
optional fields
On Sun, May 15, 2022 at 07:31:55PM -0400, Rich Felker wrote:
> On Thu, May 12, 2022 at 10:08:37AM -0400, Rich Felker wrote:
> > A few other changes I think should be made:
> >
> > [...]
> >
> > - The n[] array should be changed to size_t[] and the %n's to %zn's.
> > This should actually be done as a separate change, as it's a fix for
> > a bug overlooked when 05973dc3bbc1aca9b3c8347de6879ed72147ab3b made
> > the buffer length potentially longer than INT_MAX.
>
> I'm going to reverse position on this: since getmntent_r only accepts
> an int for the line length, the thread-unsafe getmntent should not be
> able to process longer lines either. I'll instead just use the len you
> already computed to treat lines longer than INT_MAX as invalid.
Makes sense.
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
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.