mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-16 00:51:46 +00:00
At least with MinGW on Windows vsnprintf() treats buffer < size as an error, returning -1 instead of the number of characters that would have been printed without size restrictions. Therefor msgLen may be wrong, leading to all kind of funny mistakes further down below... Buffer overflow included. Work around this by handling the msgLen < 0 case and adding an explicit terminating \0. This is another case of "I wonder why nobody has never noticed this", the GL1 renderers extension string triggered the buffer overflow each time the game started. |
||
---|---|---|
.. | ||
header | ||
shared | ||
unzip | ||
argproc.c | ||
clientserver.c | ||
cmdparser.c | ||
collision.c | ||
crc.c | ||
cvar.c | ||
filesystem.c | ||
frame.c | ||
glob.c | ||
md4.c | ||
movemsg.c | ||
netchan.c | ||
pmove.c | ||
szone.c | ||
zone.c |