From 00b586b1f3106a4e6970ca7feacb1cc1892d107e Mon Sep 17 00:00:00 2001 From: Ryan OShea Date: Fri, 3 Jul 2020 11:31:20 +0100 Subject: IVGCVSW-4920 Invalid Negative Stride fix * Added check for negative stride with ShrinkAxisMask Signed-off-by: Ryan OShea Change-Id: I8ba0a5e84cdc5d3367b683efb620f078b6cc4147 --- ConversionUtils.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index 5a111317..0fbd4e4d 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -3629,6 +3629,11 @@ bool ConvertStridedSlice(const HalOperation& operation, const HalModel& model, C { return Fail("%s: StridedSlice: Output will not be large enough to hold the slice", __func__); } + + if(stride < 0) + { + return Fail("%s: StridedSlice: Stride can not be negative while ShrinkAxisMask is set.", __func__); + } } } -- cgit v1.2.1