From: "Jakub Jelinek" <ja...@redhat.com>


man 3p sprintf says:

If copying takes place between objects that overlap as a result of a call to
sprintf() or snprintf(), the results are undefined.

ISO C99 7.19.6.6 has similar wording:

If copying takes place between objects that overlap, the behavior is undefined.
Jakub

Thanks for the details. (BTW, there's no 3p section on my linux box, and man 3 sprintf doesn't mention the undefined-ness. So thanks for the C99 reference.)

--Kaveh

Reply via email to