Fixed CursorWindow signed math for x86 builds.
All tests for our recent CursorWindow changes have been passing for ARM 64-bit builds, but they weren't executed against 32-bit x86 builds until after merged. It's not actually safe to use the "off_t" type, so we need to cast to "int32_t" when doing checks against possible-negative values, such as in allocRow(). We also add tests that verify negative rows/columns are identified as invalid positions, which requires that we check the resulting pointer against both mSlotsEnd and mSlotsStart. Bug: 169251528, 171276404, 171275409 Test: atest libandroidfw_tests:CursorWindowTest Test: atest CtsDatabaseTestCases Change-Id: Iea5f7546850f691e183fbb6e6d0952cd02b00d0f
Loading
Please register or sign in to comment