prevent writing beyond end of buffer
This commit is contained in:
parent
30eb897338
commit
e03afcb160
|
|
@ -410,7 +410,8 @@ int PS_Text(const char *text_in, int x, int y, int angle)
|
||||||
char *text;
|
char *text;
|
||||||
{
|
{
|
||||||
const size_t n_char_text = strlen(text_in);
|
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);
|
utf8_to_latin9(text, text_in, n_char_text);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue