From 5376863c0c1252194e722eac14269e5eaba6fda9 Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Viel Date: Thu, 27 Aug 2020 12:21:02 +0200 Subject: [PATCH] bugfix --- modules/flann/include/opencv2/flann/kmeans_index.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/flann/include/opencv2/flann/kmeans_index.h b/modules/flann/include/opencv2/flann/kmeans_index.h index 98ec68a87b..f96b0f81fc 100644 --- a/modules/flann/include/opencv2/flann/kmeans_index.h +++ b/modules/flann/include/opencv2/flann/kmeans_index.h @@ -773,7 +773,7 @@ private: memoryCounter_ += int(veclen_*sizeof(CentersType)); unsigned int* mean_accumulator = new unsigned int[accumulator_veclen]; - memset(mean_accumulator, 0, accumulator_veclen); + memset(mean_accumulator, 0, sizeof(unsigned int)*accumulator_veclen); for (unsigned int i=0; i( ensureSquareDistance(