Commit 30b97f2b authored by Alexander Alekhin's avatar Alexander Alekhin

stereo: fix invalid 'for' range

'(k * (ww) + ii)' overrun allocated buffer (k = height - 1, ii = ww)
parent b64c6e15
...@@ -248,7 +248,7 @@ namespace cv ...@@ -248,7 +248,7 @@ namespace cv
CostType* hsumAdd = hsumBuf + (std::min(k, height-1) % hsumBufNRows)*costBufSize; CostType* hsumAdd = hsumBuf + (std::min(k, height-1) % hsumBufNRows)*costBufSize;
if( k < height ) 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++) for(int dd = 0; dd <= params.numDisparities; dd++)
{ {
......
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