diff options
author | Andrey Nazarov <skuller@skuller.net> | 2013-03-16 19:24:48 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2013-03-20 22:04:53 +0400 |
commit | 5b90200a5fb8facbb431c789f37495ed7a6e9c10 (patch) | |
tree | bb4e4cd9b7564af5ced5e6e34e493ac1b3ada757 /src/refresh/sw/poly.c | |
parent | e7455c59057d28c58119b9ea24f1a24a556004f7 (diff) |
Add more sanity checks to software renderer.
Diffstat (limited to 'src/refresh/sw/poly.c')
-rw-r--r-- | src/refresh/sw/poly.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/refresh/sw/poly.c b/src/refresh/sw/poly.c index 860b59f..a31436e 100644 --- a/src/refresh/sw/poly.c +++ b/src/refresh/sw/poly.c @@ -620,6 +620,9 @@ static void R_BuildPolygonFromSurface(mface_t *fa) // reconstruct the polygon lnumverts = fa->numsurfedges; + if (lnumverts > MAXWORKINGVERTS) + Com_Error(ERR_DROP, "R_BuildPolygonFromSurface: too many points: %d", lnumverts); + pverts = r_clip_verts[0]; surfedge = fa->firstsurfedge; |