[PATCH v2] addmntent: Remove unbounded alloca usage from getmntent [BZ#27083]
Florian Weimer
fweimer@redhat.com
Tue Dec 22 10:16:22 GMT 2020
* Siddhesh Poyarekar via Libc-alpha:
> +/* Write STR into STREAM, escaping whitespaces as we go. */
> +#define PUTC_OR_FAIL(_c, _st) if (fputc_unlocked ((_c), (_st)) < 0) return -1
I think you should just keep writing on ferror and check for an error
using ferror in __addmntent.
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