git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10502
d7cf8633-e32d-0410-b094-
e92efae38249
// note we still allow points and lines to be tested...
if (numpoints < 1)
return 0;
// note we still allow points and lines to be tested...
if (numpoints < 1)
return 0;
+ // if the polygon has too many points, we would crash
+ if (numpoints > MAX_SVBSP_POLYGONPOINTS)
+ return 0;
poly.numpoints = numpoints;
for (i = 0;i < numpoints;i++)
{
poly.numpoints = numpoints;
for (i = 0;i < numpoints;i++)
{