From 74dd56a2fc101524deef95248b3e35947abce1ed Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 12 Oct 2024 19:49:53 +0200 Subject: [PATCH] fixed potential buffer overflow for dynamically changed fonts --- src/libgame/text.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libgame/text.c b/src/libgame/text.c index b028f9e2..87cd7dc2 100644 --- a/src/libgame/text.c +++ b/src/libgame/text.c @@ -566,7 +566,7 @@ static int DrawTextBufferExt(int x, int y, char *text_buffer, int base_font_nr, boolean centered, boolean parse_comments, boolean is_text_area) { - char buffer[line_length + 1]; + char buffer[MAX_OUTPUT_LINESIZE + 1]; int buffer_len; int font_nr = base_font_nr; int font_width = getFontWidth(font_nr); -- 2.34.1