elf_mem_map: fix uleb128 decoding (fixes incorrect member offsets)

This commit is contained in:
Yuri D'Elia 2021-06-05 17:17:00 +02:00 committed by DRracer
parent a5635997b2
commit 7f76f62af9

View File

@ -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