Fix use-after-free HWASAN crash

It may read out of array boundary if expectedCmds size is bigger than
sRestoreCmds size.

Bug: 236795444
Change-Id: I6ed146e0b064a178ce20e97a96c17c2ada21a136
Test: treehugger
1 file changed
tree: 6af8d8c01d90937003f3854358d64b82d4a8a1be
  1. client/
  2. include/
  3. netutils_wrappers/
  4. server/
  5. tests/
  6. .editorconfig
  7. Android.bp
  8. NOTICE
  9. OWNERS
  10. PREUPLOAD.cfg
  11. TEST_MAPPING