summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage_test.cpp
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2019-03-21 09:29:31 -0700
committerNick Kralevich <nnk@google.com>2019-03-21 09:29:31 -0700
commitc5da03f448485044835046fc31f9a734060ffb99 (patch)
tree124283de8346480e75aa3156f890e0330be41423 /trusty/coverage/coverage_test.cpp
parentb4ef0beb990d02600cad57096bcd20c9d646c8fa (diff)
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
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions