Add additional bounds checks to NNAPI FMQ deserialize utility functions

This CL adds the following additional bounds checks:
* Adds additional checks of the index of the std::vector before
  accessing the element at the index
* Changes the array index operator [] to the checked std::vector::at
  method

Bug: 256589724
Test: mma
Merged-In: I3461c9e33b64e7d44bb3b430c8eb00d794669037
Change-Id: I3461c9e33b64e7d44bb3b430c8eb00d794669037
(cherry picked from commit 45e8738078930b37cf63c81b29048d4fcb9166f1)
Merged-In: I3461c9e33b64e7d44bb3b430c8eb00d794669037
2 files changed
tree: 839e0ba261af90cb6b03414bec6b8fffc7a2f75e
  1. nn/
  2. .clang-format
  3. CleanSpec.mk
  4. CPPLINT.cfg
  5. OWNERS
  6. PREUPLOAD.cfg