This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/17829] Incorrect handling of precision specifier in printf family


https://sourceware.org/bugzilla/show_bug.cgi?id=17829

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to nfxjfg from comment #3)
> >Certainly, this use is not recommended because printf will allocate tons of memory as part of the format processing.
> 
> There's literally no reason why it'd need to allocate memory of the size of
> the maximum _possible_ length of the string. In fact, I'd argue printf
> doesn't need to do unbounded memory allocations at all.

But it's what the code does today.  It could be implemented differently, sure,
but until someone writes the code, submits it, and gets it through review, it's
how things are.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]