Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c5da03f4 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

entry_name_utils-inl.h: clear top bit before shifting

Attempting to shift a uint8_t which has the top bit set results in a
value outside of the range allowable for a uint8_t. The process of
converting this value back to a uint8_t triggers ubsan's
implicit-conversion sanitizer.

Ensure the high order bit is stripped before shifting, so that the
shifted value fits into the allowable uint8_t range.

This change is necessary to enable integer sanitization on this code.

Somewhat related to Bug: 122975762
Test: atest ziparchive-tests

Change-Id: I940c8b2828ac88348d80f731274b990e35de6631
parent b4ef0beb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment