Layer: Guard against Region offset overflows am: 33da946835

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/18887801

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