Files
opencv-MIRROR/modules
Trishanth Mellimi a0a2a1ca54 photo: fix OOB read in Domain_Filter::compute_NCfilter for degenerate masks
cv::stylization always drives Domain_Filter::filter() with NORMCONV_FILTER,
which calls compute_NCfilter on the working matrix and its transpose each
iteration. When either has a single column, the summed-area-table index
math can produce a negative offset that reads past the box_filter buffer.

A single column has no neighbor to convolve across, so the correct result
is an unchanged output -- exactly what compute_Rfilter already does for
w==1 via its no-op loop bounds. Return early instead of running the
box-filter math in that case.

Fixing compute_NCfilter directly (rather than guarding cv::stylization's
input, as suggested in the issue) also covers cv::edgePreservingFilter
when called with NORMCONV_FILTER, and covers single-row inputs, which hit
the identical bug through the internal transposed pass.

Closes #29614
2026-07-29 13:45:43 +05:30
..
2026-07-28 20:28:24 +05:30
2026-07-28 20:27:29 +05:30
2026-07-09 12:17:24 +03:00
2026-07-09 12:17:24 +03:00
2026-07-09 12:17:24 +03:00
2026-07-28 20:27:29 +05:30
2026-05-20 17:57:51 +03:00