[PATCH v2] addmntent: Remove unbounded alloca usage from getmntent [BZ#27083]

Szabolcs Nagy szabolcs.nagy@arm.com
Tue Dec 22 21:15:42 GMT 2020


The 12/22/2020 15:38, Siddhesh Poyarekar via Libc-alpha wrote:
> 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.

aarch64 buildbot fails because

$ cat elf/check-localplt.out
Extra PLT reference: libc.so: ferror



More information about the Libc-alpha mailing list