From: Inki Dae Date: Tue, 25 Aug 2020 08:18:16 +0000 (+0900) Subject: Check tensor data type correctly X-Git-Tag: submit/tizen/20200828.025650^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_6.0;p=platform%2Fcore%2Fmultimedia%2Finference-engine-interface.git Check tensor data type correctly Change-Id: I47a65126b6a5532477cd7b3fd2b30dc2f1153348 Signed-off-by: Inki Dae --- diff --git a/src/inference_engine_common_impl.cpp b/src/inference_engine_common_impl.cpp index 367ff7c..d27be80 100644 --- a/src/inference_engine_common_impl.cpp +++ b/src/inference_engine_common_impl.cpp @@ -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; }