This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Libiberty's snprintf for v3?
Nathan Myers wrote:
It seems to me that we should be able to establish an upper bound
on the number of characters that can be produced by a printf format
for these uses, so that sprintf itself should be safe. What am I
missing?
Nothing, actually ;)
I did my best to establish good upper bounds (with your help at least
one time, I seem to recall) but, nevertheless, I'm still finding 'safer'
the built-in logic present in snprintf and I like the simplifications
made possible by a snprintf unconditionally available on any platform
(both C99 e C90).
Paolo.
P.S. Of course, in the long term Jerry will format floats too without
relying on s[n]printf...