shithub: qk1

Download patch

ref: 94d0eb470742c70f790de8ffb92f83a7ba88afa0
parent: 48aef20078bc1733bba385b94893e0eec514e93b
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Nov 8 20:30:34 EST 2023

R_AliasClipTriangle: fix dangling stack pointer set in a global variable (clang analyzer)

--- a/r_aclip.c
+++ b/r_aclip.c
@@ -208,9 +208,9 @@
 */
 void R_AliasClipTriangle (mtriangle_t *ptri)
 {
-	int				i, k, pingpong;
-	mtriangle_t		mtri;
-	unsigned		clipflags;
+	int					i, k, pingpong;
+	static mtriangle_t	mtri;
+	unsigned			clipflags;
 
 	memset(fv, 0, sizeof(fv));