From: havoc Date: Thu, 23 Mar 2006 02:34:16 +0000 (+0000) Subject: added more validation of clipnodes loaded from a q1bsp file X-Git-Tag: xonotic-v0.1.0preview~4151 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4d1fd3c5300f6db48293cb15df23bf4d2590eed9;p=xonotic%2Fdarkplaces.git added more validation of clipnodes loaded from a q1bsp file git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6169 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/model_brush.c b/model_brush.c index eded31a1..53eb3ff0 100644 --- a/model_brush.c +++ b/model_brush.c @@ -2349,6 +2349,8 @@ static void Mod_Q1BSP_LoadClipnodes(lump_t *l, hullinfo_t *hullinfo) out->planenum = LittleLong(in->planenum); out->children[0] = LittleShort(in->children[0]); out->children[1] = LittleShort(in->children[1]); + if (out->planenum < 0 || out->planenum >= loadmodel->brush.num_planes) + Host_Error("Corrupt clipping hull(out of range planenum)"); if (out->children[0] >= count || out->children[1] >= count) Host_Error("Corrupt clipping hull(out of range child)"); }