prevent writing beyond end of buffer
This commit is contained in:
parent
02222be165
commit
c68940712d
|
|
@ -410,7 +410,8 @@ int PS_Text(const char *text_in, int x, int y, int angle)
|
|||
char *text;
|
||||
{
|
||||
const size_t n_char_text = strlen(text_in);
|
||||
text = TMALLOC(char, n_char_text);
|
||||
const size_t n_char_textp = n_char_text + 2;
|
||||
text = TMALLOC(char, n_char_textp);
|
||||
utf8_to_latin9(text, text_in, n_char_text);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue