From db977e6f751c6c38941eacf1fb03344ce5e406b6 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Fri, 3 Mar 2017 23:15:04 +0200 Subject: [PATCH] Fix stack overflow in SSE code This was checking the wrong variable so when count was < 4 it was writing past the end of buffer and potentially breaking the stack. --- idlib/math/Simd_SSE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idlib/math/Simd_SSE.cpp b/idlib/math/Simd_SSE.cpp index 49b3252..4c00500 100644 --- a/idlib/math/Simd_SSE.cpp +++ b/idlib/math/Simd_SSE.cpp @@ -489,7 +489,7 @@ void VPCALL idSIMD_SSE::Dot( float *dst, const idVec3 &constant, const idPlane * /* jz startVert1 */ - if (count != 0) { + if (count_l4 != 0) { /* imul eax, 16 add esi, eax