mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-02 05:52:15 +00:00
b1629fb768
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. |
||
---|---|---|
.. | ||
client.h | ||
console.h | ||
keyboard.h | ||
screen.h |