Date: Sun, 15 May 2022 19:31:55 -0400 From: Rich Felker <dalias@...c.org> To: Alyssa Ross <hi@...ssa.is> Cc: musl@...ts.openwall.com Subject: Re: [PATCH musl v2 3/3] mntent: fix parsing lines with optional fields 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. 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.