Files
opencv-MIRROR/modules/stereo/test
spicysharkco c4e83bef52 stereo: fix out-of-bounds access in validateDisparity
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.
2026-10-16 16:59:33 +00:00
..