fixed memory corruption in cvtest::copyMakeBorder (thanks to Pieter-Jan Busschaert)

This commit is contained in:
Vadim Pisarevsky 2011-02-17 09:07:55 +00:00
parent e1b5a4fcc8
commit 9c05a74fee

View File

@ -900,7 +900,7 @@ void copyMakeBorder(const Mat& src, Mat& dst, int top, int bottom, int left, int
}
else
{
vector<int> tabvec((left + right)*esz);
vector<int> tabvec((left + right)*esz + 1);
int* ltab = &tabvec[0];
int* rtab = &tabvec[left*esz];
for( i = 0; i < left; i++ )