From a42789f330ddeecf3902744dcda99e6e11b2d965 Mon Sep 17 00:00:00 2001 From: Pavel Vlasov Date: Mon, 23 Apr 2018 09:45:10 +0300 Subject: [PATCH] IPP morphology with big images hotfix. --- modules/imgproc/src/morph.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/imgproc/src/morph.cpp b/modules/imgproc/src/morph.cpp index 73e447189b..ca92da3244 100644 --- a/modules/imgproc/src/morph.cpp +++ b/modules/imgproc/src/morph.cpp @@ -1148,6 +1148,11 @@ static bool ippMorph(int op, int src_type, int dst_type, // Different mask flipping if(op == MORPH_GRADIENT) return false; + + // Integer overflow bug + if(src_step >= IPP_MAX_32S || + src_step*height >= IPP_MAX_32S) + return false; #endif #if IPP_VERSION_X100 < 201801