elf_mem_map: fix uleb128 decoding (fixes incorrect member offsets)
This commit is contained in:
parent
a5635997b2
commit
7f76f62af9
@ -63,10 +63,10 @@ def get_FORM_block1(attr):
|
|||||||
v = 0
|
v = 0
|
||||||
s = 0
|
s = 0
|
||||||
for b in attr.value[1:]:
|
for b in attr.value[1:]:
|
||||||
v |= b
|
v |= (b & 0x7f) << s
|
||||||
s += 7
|
if b & 0x80 == 0:
|
||||||
if not b & 0x100:
|
|
||||||
break
|
break
|
||||||
|
s += 7
|
||||||
return v
|
return v
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user