Check tensor data type correctly 55/242255/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix tizen_6.0 tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.121100 accepted/tizen/6.0/unified/hotfix/20201103.051658 accepted/tizen/unified/20200831.002558 submit/tizen/20200828.025650 submit/tizen/20200828.100528 submit/tizen_6.0/20201029.205103 submit/tizen_6.0_hotfix/20201102.192503 submit/tizen_6.0_hotfix/20201103.114803 tizen_6.0.m2_release
authorInki Dae <inki.dae@samsung.com>
Tue, 25 Aug 2020 08:18:16 +0000 (17:18 +0900)
committerInki Dae <inki.dae@samsung.com>
Tue, 25 Aug 2020 08:18:16 +0000 (17:18 +0900)
Change-Id: I47a65126b6a5532477cd7b3fd2b30dc2f1153348
Signed-off-by: Inki Dae <inki.dae@samsung.com>
src/inference_engine_common_impl.cpp

index 367ff7c..d27be80 100644 (file)
@@ -110,8 +110,8 @@ namespace Common
                                return INFERENCE_ENGINE_ERROR_INVALID_PARAMETER;
                        }
 
-                       if (tensor_info.data_type < INFERENCE_TENSOR_DATA_TYPE_FLOAT16 ||
-                               tensor_info.data_type > INFERENCE_TENSOR_DATA_TYPE_UINT32) {
+                       if (tensor_info.data_type <= INFERENCE_TENSOR_DATA_TYPE_NONE ||
+                               tensor_info.data_type >= INFERENCE_TENSOR_DATA_TYPE_MAX) {
                                LOGE("tensor data type is invalid.");
                                return INFERENCE_ENGINE_ERROR_INVALID_PARAMETER;
                        }