string-appending sprintf calls relying on undefined behavior
Created an attachment (id=334)
replace sprintf() calls with well-defined semantics
There are three places in the code where a construct of this sort is used to append onto a string:
sprintf(buf, "%s and other stuff", buf);
...which is explicitly undefined behavior under C99, and will not work as anticipated (truncating instead of appending) with gcc-4.3 if -D_FORTIFY_SOURCE=2 is set.
What's there now should work under default compiler options everywhere at this time, but could lead to problems down the line if C99 compliance starts getting improved - and it's a nicely trivial patch to rewrite those calls in a portable manner.
(Further discussion: http://lists.debian.org/debian-devel/2008/12/msg01079.html)