Correct boundary check and add log.

Bug: 142514392
Test: sanity
Change-Id: Icf3e7d2c31c8d7a9da371d51cffc8721d8ba8fa1
1 file changed