stereo: fix invalid 'for' range

'(k * (ww) + ii)' overrun allocated buffer (k = height - 1, ii = ww)
pull/1475/head
Alexander Alekhin 7 years ago
parent b64c6e1519
commit 30b97f2b86
  1. 2
      modules/stereo/src/stereo_binary_sgbm.cpp

@ -248,7 +248,7 @@ namespace cv
CostType* hsumAdd = hsumBuf + (std::min(k, height-1) % hsumBufNRows)*costBufSize;
if( k < height )
{
for(int ii = 0; ii <= ww; ii++)
for(int ii = 0; ii < ww; ii++)
{
for(int dd = 0; dd <= params.numDisparities; dd++)
{

Loading…
Cancel
Save