summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2017-02-07 18:03:26 +0100
committer/dev/humancontroller <devhc@example.com>2017-02-07 18:05:47 +0100
commit6c92c1b67a8ffc05a3433b047eb5e926d6ba9e31 (patch)
tree47cb7fd1274862aa2cfd2465ec200e1256245074 /src/server
parente743be2b793d15052228e625d98b765c0315b878 (diff)
protect the server against the game module passing OOB passEntityNum values (ie. -1 instead of ENTITYNUM_NONE) in trace calls
Diffstat (limited to 'src/server')
-rw-r--r--src/server/sv_world.c3
1 files changed, 3 insertions, 0 deletions
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 );