From f88b97ede272e54d67e7f4da165359df4b534a4a Mon Sep 17 00:00:00 2001 From: Sheil Kumar Date: Sun, 5 Mar 2023 06:21:46 -0800 Subject: [PATCH] Cast to int32_t->size_t to avoid prefast overflow warning (#14902) Cast to int32_t->size_t to avoid prefast overflow warning --- .../dml/DmlExecutionProvider/src/MLOperatorAuthorImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/MLOperatorAuthorImpl.cpp b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/MLOperatorAuthorImpl.cpp index e150117af4..2c58d5d36d 100644 --- a/onnxruntime/core/providers/dml/DmlExecutionProvider/src/MLOperatorAuthorImpl.cpp +++ b/onnxruntime/core/providers/dml/DmlExecutionProvider/src/MLOperatorAuthorImpl.cpp @@ -1945,7 +1945,7 @@ namespace Windows::AI::MachineLearning::Adapter ML_CHECK_BOOL(inputIndex < m_inputTensors.size()); if (sequenceIndex >= m_inputTensors[inputIndex].size()) { - opKernelContextWrapper->m_inputTensors[inputIndex].resize(sequenceIndex+1); + opKernelContextWrapper->m_inputTensors[inputIndex].resize(static_cast(sequenceIndex)+1); } if (m_inputTensors[inputIndex][sequenceIndex] == nullptr)