yquake2remaster/src/client/header
Yamagi Burmeister b1629fb768 Prevent buffer overflows console if vertical resolution > 2048.
The stores it's text in the key_lines array which is NUM_KEY_LINES *
MAXCMDLINE chars long. The code never checked for overflows, it just
assumed that a line will never be longer then 256 chars * 8 = 2048
pixel. With modern displays we can have higher vertical resolutions,
so the array will overflow sooner or later.

Fix it by clamping the maximum line width to MAXCMDLINE - 2 chars (1
for the prompt and 1 for the terminating \0). While at it increase
MAXCMDLINE to 1024 chars * 8 = 8192 pixel, which is more then 8k
resolution and should be enough for the years to come.

This is belived tot fix at least a part of issue #368.
2019-02-16 08:57:44 +01:00
..
client.h Rename cl_http.c to curl/download.c and http.h to download.h. 2018-12-20 18:01:38 +01:00
console.h Whitespace fixes. 2012-04-30 08:25:59 +02:00
keyboard.h Prevent buffer overflows console if vertical resolution > 2048. 2019-02-16 08:57:44 +01:00
screen.h Implement gl_menuscale 2014-06-24 19:11:46 +02:00