From a942359628803c6974467ec9f31c0b07ab0d16d1 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. --- neo/idlib/math/Simd_SSE.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo/idlib/math/Simd_SSE.cpp b/neo/idlib/math/Simd_SSE.cpp index 49b32524..4c00500a 100644 --- a/neo/idlib/math/Simd_SSE.cpp +++ b/neo/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