Add bounds checking for transparency lookup Bug: 71361451 Test: manual test with sample app Change-Id: Icaa626cfc93115fe1cc2f42040b396c2318bb6e4 (cherry picked from commit 53f97a2dd69b5b74e0fae2108ebab9276760aa47)