mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-28 00:33:36 +00:00
Fix DWARF parsing
This commit is contained in:
parent
59c6498cc2
commit
0f14e3352c
@ -23,13 +23,8 @@ R_API const ut8 *r_leb128 (const ut8 *data, st64 *v) {
|
||||
s += 7;
|
||||
if (!(c & 0x80)) break;
|
||||
}
|
||||
/* FIXME: More proper sum calculation */
|
||||
if ((s < (8 * sizeof (sum))) && (c & 0x40)) {
|
||||
if (sum < 32) {
|
||||
sum |= -(1 << s);
|
||||
} else {
|
||||
eprintf ("r_len128(): s is too big (>31) - undefined behaviour!\n");
|
||||
}
|
||||
sum |= -((st64)1 << s);
|
||||
}
|
||||
if (v) *v = sum;
|
||||
return data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user