1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

core: avoid function type cast, make happy UBSAN

oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14115
This commit is contained in:
Alexander Alekhin
2019-06-11 07:06:29 +00:00
parent 11b020b9f9
commit d3d13c41c4
3 changed files with 43 additions and 35 deletions
+2 -2
View File
@@ -244,12 +244,12 @@ void convertFp16(InputArray _src, OutputArray _dst)
}
else
ddepth = CV_16S;
func = (BinaryFunc)getConvertFunc(CV_32F, CV_16F);
func = getConvertFunc(CV_32F, CV_16F);
break;
case CV_16S:
case CV_16F:
ddepth = CV_32F;
func = (BinaryFunc)getConvertFunc(CV_16F, CV_32F);
func = getConvertFunc(CV_16F, CV_32F);
break;
default:
CV_Error(Error::StsUnsupportedFormat, "Unsupported input depth");