projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad43e2a
)
fixed potential buffer overflow for dynamically changed fonts
author
Holger Schemel
<holger.schemel@virtion.de>
Sat, 12 Oct 2024 17:49:53 +0000
(19:49 +0200)
committer
Holger Schemel
<holger.schemel@virtion.de>
Sat, 12 Oct 2024 17:49:53 +0000
(19:49 +0200)
src/libgame/text.c
patch
|
blob
|
history
diff --git
a/src/libgame/text.c
b/src/libgame/text.c
index b028f9e296398a8b505e97fce56741e511683dfa..87cd7dc22a3eba5543fcfe5f591d50402b6c91df 100644
(file)
--- 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);