Check size of grantors before indexing into the vec am: 2b686fcd97 am: ca82973033 am: 75b22bfaa5

Original change: https://android-review.googlesource.com/c/platform/system/libhidl/+/2113745

Change-Id: I7ce9a9da4bd990c144276ea275bcef3521a660f1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>