ioq3quest/code
Simon McVittie 01bfb1540f UI_BuildFindPlayerList: avoid array underflow
This function is used in the Team Arena menus

I don't think it's actually possible to reach this line with
foundPlayerServerNames < 1, because by the time we get here we have
set it to 1 + the actual number of servers; but if we did, it would
clearly underflow into foundPlayerServerNames[-1], which would be
undefined behaviour. gcc 6 diagnoses this with a warning:

code/ui/ui_main.c: In function ‘UI_BuildFindPlayerList’:
code/ui/ui_main.c:4138:16: warning: array subscript is below array bounds [-Warray-bounds]

Also correct the sizeof() invocation to make it more obviously
correct (in fact the buffers for names and addresses happen to both
be of size MAX_ADDRESSLENGTH, so it was fine, but it's good to be
obvious).
2016-09-25 17:13:47 +01:00
..
AL 5882 - Update OpenAL Headers to OpenAL Soft 1.15.1 2013-02-17 07:34:41 -06:00
asm Remove unused fpucw from snapvector.asm 2015-07-09 18:35:45 -05:00
botlib [code/botlib/l_precomp.c] Fix string buffer overflow 2016-09-13 13:37:19 +01:00
cgame Fix glyph width calculation in Text_Paint_Limit 2015-09-15 16:56:03 -05:00
client snd_wavelet: avoid undefined pointer below array bounds 2016-09-25 17:13:40 +01:00
game [game/ai_main.c] Use floating-point fabs() for floating-point values 2016-08-23 19:36:27 +01:00
jpeg-8c Mark JPEG lib changes, file provided by Simon McVittie 2012-07-01 18:07:56 +00:00
libcurl-7.35.0/curl Fix building with curl on Linux PPC and Sparc 2014-09-09 13:18:28 -04:00
libogg-1.3.1 Upgrade libogg 1.3.0 to 1.3.1 2014-02-08 03:38:01 +00:00
libs Add stripped SDL2 reference dll's to repo 2016-08-16 10:50:24 -04:00
libspeex Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings 2011-07-29 12:27:00 +00:00
libvorbis-1.3.4 There have been 0 days since the last compiler warning 2014-08-27 12:40:45 +01:00
null [null/null_glimp.c] Fix up bitrot in null impl 2016-07-26 10:52:15 +01:00
opus-1.1 Fix a few warnings 2014-08-30 17:29:23 +01:00
opusfile-0.5 Fix a few warnings 2014-08-30 17:29:23 +01:00
q3_ui Fix iamamonkey printing 'levels' instead of 'awards' 2016-05-23 10:23:14 -05:00
qcommon [qcommon/msg.c] Remove dead code (which had undefined behaviour) 2016-09-12 13:32:59 +01:00
renderercommon OpenGL2: Fix GL_EXT_direct_state_access function names. 2016-07-28 20:04:25 -07:00
renderergl1 Fix undefined behavior when shifting left by 32. 2016-09-07 16:56:23 -07:00
renderergl2 OpenGL2: Clamp entity lighting to more resemble OpenGL1. 2016-09-14 04:19:46 -07:00
sdl Fix joystick w/o controller mapping not working with SDL update. 2016-08-16 19:01:18 -07:00
SDL2/include Update SDL2 to 2.0.4 2016-08-15 22:20:00 -04:00
server Fix warnings that names passed to Name_PlayerNameCompletion is not const 2016-05-09 10:41:58 -05:00
sys Fix Makefile for OSX 2016-06-12 17:17:33 -04:00
tools [botlib] Use floating point absolute value rather than truncate to integer 2016-07-25 18:36:31 +01:00
ui UI_BuildFindPlayerList: avoid array underflow 2016-09-25 17:13:47 +01:00
zlib drop some useless return statements 2013-05-30 15:43:21 -05:00