Skip to content

Commit 30b97f2

Browse files
committed
stereo: fix invalid 'for' range
'(k * (ww) + ii)' overrun allocated buffer (k = height - 1, ii = ww)
1 parent b64c6e1 commit 30b97f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/stereo/src/stereo_binary_sgbm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ namespace cv
248248
CostType* hsumAdd = hsumBuf + (std::min(k, height-1) % hsumBufNRows)*costBufSize;
249249
if( k < height )
250250
{
251-
for(int ii = 0; ii <= ww; ii++)
251+
for(int ii = 0; ii < ww; ii++)
252252
{
253253
for(int dd = 0; dd <= params.numDisparities; dd++)
254254
{

0 commit comments

Comments
 (0)