diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-13 17:28:47 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-13 17:28:47 +0000 |
commit | c563cc54700d780f567029db8bb1ed556da5ed30 (patch) | |
tree | d6174d70d84fd677dc24f79140246ff0a043b7ac | |
parent | d4e2087ce0644beefbb4d6b7422ef47c44dedb72 (diff) | |
parent | e9dd6e117152658ef0d359565df9f93124c31b0b (diff) | |
download | NeuralNetworks-aml_adb_340912530.tar.gz |
Snap for 10491609 from e9dd6e117152658ef0d359565df9f93124c31b0b to mainline-adbd-releaseaml_adb_340912530aml_adb_340912350aml_adb_340912200aml_adb_340912000android14-mainline-adbd-release
Change-Id: If08bcd3b2aa3ed5629bf07170cb7a6af698e3449
-rw-r--r-- | shim_and_sl/ShimConverter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/shim_and_sl/ShimConverter.cpp b/shim_and_sl/ShimConverter.cpp index ed3cda236..9914af19b 100644 --- a/shim_and_sl/ShimConverter.cpp +++ b/shim_and_sl/ShimConverter.cpp @@ -154,6 +154,10 @@ ANeuralNetworksModel* convertSubgraphFromHAL( break; } case OperandLifeTime::CONSTANT_POOL: { + if (operand.location.poolIndex >= memoryPools.size()) { + *errorStatus = ErrorStatus::INVALID_ARGUMENT; + return nullptr; + } resultModel.setOperandValueFromMemory( i, memoryPools[operand.location.poolIndex].get(), operand.location.offset, operand.location.length); |