[PATCH v3] addmntent: Remove unbounded alloca usage from getmntent [BZ#27083]
Florian Weimer
fweimer@redhat.com
Tue Dec 22 14:57:22 GMT 2020
* Siddhesh Poyarekar via Libc-alpha:
> The addmntent function replicates elements of struct mnt on stack
> using alloca, which is unsafe. Put characters directly into the
> stream, escaping them as they're being written out.
>
> Also add a test to check all escaped characters with addmntent and
> getmntent.
This version looks okay to me.
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
More information about the Libc-alpha
mailing list