Bug #14898: Don't abuse the sprintf() implementation.

The thing you're printing into should not itself appear in the list of
things to print from, that's bad juju.  Just use strcat().
This commit is contained in:
Adam Jackson 2008-06-24 13:16:53 -04:00
parent 21e464ec68
commit f6af6dd2f7

View file

@ -615,7 +615,8 @@ get_rotate_fontname(
for(field_num = 0 ; field_num < CHARSET_ENCODING_FIELD &&
fields[field_num] ; field_num++) {
sprintf(rotate_font_ptr, "%s-%s", rotate_font_ptr, fields[field_num]);
strcat(rotate_font_ptr, "-");
strcat(rotate_font_ptr, fields[field_num]);
}
if(pattern)