commit | f67415af187dc346267d2c9372dae3817837580f | [log] [tgz] |
---|---|---|
author | Marco Nelissen <marcone@google.com> | Thu Jun 20 12:33:37 2019 -0700 |
committer | Marco Nelissen <marcone@google.com> | Thu Jun 20 19:38:16 2019 +0000 |
tree | aae32455392e9022c939b6c952849915a8d84d62 | |
parent | 84da163316aacafec26ecf9e31be1cefd9a4c43c [diff] |
Fix hwasan/ubsan issue Fix left shift of values >127 by 24. The intermediary "unsigned char" got promoted "int", which was then left-shifted by 24, thus extending into the sign bit, before being assigned back to an unsigned int. Explicitly cast the intermediary to an unsigned int to avoid the problem. Bug: 134892789 Test: assembly code is identical Change-Id: Ifde58385cbededb4cc8672163d2198cd91bf3c97