mntent: fix potential mishandling of extremely long lines
authorRich Felker <dalias@aerifal.cx>
Sun, 15 May 2022 23:22:05 +0000 (19:22 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 15 May 2022 23:26:22 +0000 (19:26 -0400)
commit8974ef2124118e4ed8cad7ee0534b36e5c584c4e
treec0c5db948532ad59fa69613f4f50e4fce7351490
parent751bee0ee727e8d8b003c87cff77ac76f1dbecd6
mntent: fix potential mishandling of extremely long lines

commit 05973dc3bbc1aca9b3c8347de6879ed72147ab3b made it so that lines
longer than INT_MAX can in theory be read, but did not use a suitable
type for the positions determined by sscanf. we could change to using
size_t, but since the signature for getmntent_r does not admit lines
longer than INT_MAX, it does not make sense to support them in the
legacy thread-unsafe form either -- the principle here is that there
should not be an incentive to use the unsafe function to get added
functionality.
src/misc/mntent.c