From aa8c6a251e0c988aa4d8f6914d2052a9d2c9cbc2 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 26 Jan 2016 23:31:48 +0100 Subject: [PATCH] Make sure that micro-panel-size is smaller than blocking sizes (otherwise we might get a buffer overflow) --- Eigen/src/Core/products/TriangularMatrixMatrix.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/products/TriangularMatrixMatrix.h b/Eigen/src/Core/products/TriangularMatrixMatrix.h index 39ab87df8..8a2f7cd78 100644 --- a/Eigen/src/Core/products/TriangularMatrixMatrix.h +++ b/Eigen/src/Core/products/TriangularMatrixMatrix.h @@ -126,6 +126,10 @@ EIGEN_DONT_INLINE void product_triangular_matrix_matrix(actual_kc-k1, SmallPanelWidth); + Index actualPanelWidth = std::min(actual_kc-k1, panelWidth); Index lengthTarget = IsLower ? actual_kc-k1-actualPanelWidth : k1; Index startBlock = actual_k2+k1; Index blockBOffset = k1;