mirror of
https://github.com/opencv/opencv.git
synced 2026-07-25 21:33:04 +04:00
dbf872ac1b
The minMaxIdx dispatch table in modules/core/src/minmax.cpp stored seven differently typed functions through C-style casts to a single MinMaxIdxFunc pointer type, which is undefined behaviour and trips UBSan's -fsanitize=function for any CV_32F or CV_64F input. This change switches the typedef and every depth-specific helper to take void pointers for src, minval and maxval, with the original typed pointer recovered at function entry. The dispatch table no longer needs C-style casts and the int pointer punning at the call site goes away. Fixes #28928.