https://bugzilla.novell.com/show_bug.cgi?id=385634 User shawn.bohrer@gmail.com added comment https://bugzilla.novell.com/show_bug.cgi?id=385634#c2 --- Comment #2 from Shawn Bohrer <shawn.bohrer@gmail.com> 2008-10-24 09:31:12 MDT --- The functions snprintf() and vsnprintf() write at most size bytes (including the trailing null byte (’\0’)) to str. 'size' can be larger or smaller than the buffer it doesn't really matter. The important thing is size allows you to set an upper bound on how many bytes you will ever print into that buffer. For example if you only ever wanted to print 4 bytes of data regardless of what 'format' and 'ap' are you would set size to 4. Your example simply points out that the buffer needs to be large enough to hold the data from 'format' and 'ap'. Regardless, my example simply demonstrated the issue. Try printing a string of size INT32_MAX into an adequately sized buffer and you should see the same problem. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.