From 5791e89e4d671dea5e58ca8a9f0dafd4410aaac7 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sat, 13 Nov 2010 21:59:07 +0000 Subject: [PATCH] fixed buffer allocation for constant-value borders in the filter engine (ticket #524) --- modules/imgproc/src/filter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/imgproc/src/filter.cpp b/modules/imgproc/src/filter.cpp index fc8f1737e6..107a1a45c6 100644 --- a/modules/imgproc/src/filter.cpp +++ b/modules/imgproc/src/filter.cpp @@ -219,7 +219,7 @@ int FilterEngine::start(Size _wholeSize, Rect _roi, int _maxBufRows) srcRow.resize(esz*(maxWidth + ksize.width - 1)); if( columnBorderType == BORDER_CONSTANT ) { - constBorderRow.resize(getElemSize(bufType)*(maxWidth+VEC_ALIGN)); + constBorderRow.resize(getElemSize(bufType)*(maxWidth + ksize.width - 1 + VEC_ALIGN)); uchar *dst = alignPtr(&constBorderRow[0], VEC_ALIGN), *tdst; int n = (int)constBorderValue.size(), N; if( isSeparable() )