Add AID length check to prevent OOB access am: 507b2328aa am: 3623295023

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/st/secure_element2/+/22841500

Change-Id: Ic6bf66fdb2e0bd3590d9e5cc40f24f1da83f989f
Signed-off-by: Automerger Merge Worker <[email protected]>