https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88993

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Rather than warning about this the bugs should be fixed, there is no reason why
glibc needs to malloc memory for these cases.  For "%.65535s" I don't actually
see where it would allocate memory, I see memory allocations when it has to
convert between wide and narrow strings or vice versa, for either of these
cases it is enough to put a max cap on the buffer size and just handle it
piecewise rather than all in one go.  For integral numbers with high precision,
again, it is trivial to estimate how many characters you really need, the rest
is just padding which can be handled differently.

Reply via email to