Commit 9c05a74f authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

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

parent e1b5a4fc
......@@ -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++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment