From 9c05a74fee8395efec53ea3ac1de2a9082422b51 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Thu, 17 Feb 2011 09:07:55 +0000 Subject: [PATCH] fixed memory corruption in cvtest::copyMakeBorder (thanks to Pieter-Jan Busschaert) --- modules/ts/src/ts_func.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ts/src/ts_func.cpp b/modules/ts/src/ts_func.cpp index 5ad45f1..59d1163 100644 --- a/modules/ts/src/ts_func.cpp +++ b/modules/ts/src/ts_func.cpp @@ -900,7 +900,7 @@ void copyMakeBorder(const Mat& src, Mat& dst, int top, int bottom, int left, int } else { - vector tabvec((left + right)*esz); + vector tabvec((left + right)*esz + 1); int* ltab = &tabvec[0]; int* rtab = &tabvec[left*esz]; for( i = 0; i < left; i++ ) -- 2.7.4