mirror of
https://github.com/opencv/opencv.git
synced 2026-11-18 07:18:12 -06:00
x2 is computed from the disparity value and was used as an index into disp2cost and disp2buf without a range check, in both the CV_16S and the CV_32S cost branches. A disparity outside the range given by minDisparity and numberOfDisparities made x2 negative or not less than cols. Skip such pixels in the reverse mapping pass. The final consistency pass already bounds-checks the mapped columns. Ports #30316 to 5.x. Relates to #25367.