[DO NOT MERGE] Check bounds in offsetToPtr am: 7b83d625aa
am: 2d54d2c0d5

Change-Id: I29dccd1ed95079470fc1dd7b04e3db6c5c7d76d2