Cast to int32_t->size_t to avoid prefast overflow warning (#14902)

Cast to int32_t->size_t to avoid prefast overflow warning
This commit is contained in:
Sheil Kumar 2023-03-05 06:21:46 -08:00 committed by GitHub
parent 6c8538f086
commit f88b97ede2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<size_t>(sequenceIndex)+1);
}
if (m_inputTensors[inputIndex][sequenceIndex] == nullptr)