From: Holger Schemel Date: Sat, 12 Oct 2024 17:49:53 +0000 (+0200) Subject: fixed potential buffer overflow for dynamically changed fonts X-Git-Tag: 4.4.0.0-test-4~138 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=74dd56a2fc101524deef95248b3e35947abce1ed;p=rocksndiamonds.git fixed potential buffer overflow for dynamically changed fonts --- 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);