From 6c92c1b67a8ffc05a3433b047eb5e926d6ba9e31 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Tue, 7 Feb 2017 18:03:26 +0100 Subject: protect the server against the game module passing OOB passEntityNum values (ie. -1 instead of ENTITYNUM_NONE) in trace calls --- src/server/sv_world.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/server/sv_world.c b/src/server/sv_world.c index a30ea7a2..c10f1e92 100644 --- a/src/server/sv_world.c +++ b/src/server/sv_world.c @@ -615,6 +615,9 @@ void SV_Trace( trace_t *results, const vec3_t start, vec3_t mins, vec3_t maxs, c return; // blocked immediately by the world } + if( passEntityNum < 0 || passEntityNum > ENTITYNUM_NONE ) + passEntityNum = ENTITYNUM_NONE; + clip.contentmask = contentmask; clip.start = start; // VectorCopy( clip.trace.endpos, clip.end ); -- cgit