mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-01 11:11:56 +00:00
Fix too large shifting in uleb128
This commit is contained in:
parent
c98d15e084
commit
318b45ba6b
@ -158,11 +158,13 @@ R_API st64 r_sleb128(const ut8 **data, const ut8 *end) {
|
||||
st64 chunk;
|
||||
value = *p;
|
||||
chunk = value & 0x7f;
|
||||
if (offset < 64) {
|
||||
result |= (chunk << offset);
|
||||
}
|
||||
offset += 7;
|
||||
} while (cond = *p & 0x80 && p + 1 < end, p++, cond);
|
||||
|
||||
if ((value & 0x40) != 0) {
|
||||
if ((value & 0x40) != 0 && offset < 64) {
|
||||
result |= ~0ULL << offset;
|
||||
}
|
||||
*data = p;
|
||||
|
Loading…
x
Reference in New Issue
Block a user