gmp_snprintf tries to allocate 18 EB on long strings

Niels Möller nisse at lysator.liu.se
Thu Feb 1 10:32:55 UTC 2018


"Marco Bodrato" <bodrato at mail.dm.unipi.it> writes:

> I think we should change that code completely, calling the library
> vsnprintf just once and trusting the result. It will break compatibility
> with glibc 2.0.x, but we should not care of this any more, right?

I think we should be able to rely on C99 vsnprintf. If need, check for
correct behavior in configure, and fall back to repl_vsnprintf if
snprintf exhibits non-standard behavior.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list