DS GX: Reject and log polygons that clip to more than 10 vertices
Vicki Pfau vi@endrift.com
Sun, 19 Jul 2020 15:36:34 -0700
2 files changed,
5 insertions(+),
0 deletions(-)
M
src/ds/gx.c
→
src/ds/gx.c
@@ -335,6 +335,10 @@ int plane;
for (plane = 5; plane >= 0; --plane) { newV = 0; for (v = 0; v < poly->verts; ++v) { + if (newV >= 10) { + mLOG(DS_GX, ERROR, "Polygon clipping invariant failed"); + return false; + } if (!(offscreenVerts[v] & (1 << plane))) { outList[newV] = inList[v]; outOffscreenVerts[newV] = offscreenVerts[v];