IOsipov / androguard

Automatically exported from code.google.com/p/androguard
Apache License 2.0
0 stars 0 forks source link

problem of get_raw in dvm #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.when I run ./demos/dalvikvm_format_2.py, it throw errors.

What is the expected output? What do you see instead?
the expected output should encode decoded dex file correctly.But I saw:
Traceback (most recent call last):
  File "./demos/dalvikvm_format_2.py", line 25, in <module>
    fd.write( j.save() )
  File ".//core/bytecodes/dvm.py", line 3183, in save
    return self._get_raw()
  File ".//core/bytecodes/dvm.py", line 3211, in _get_raw
    l = self.map_list.get_raw()
  File ".//core/bytecodes/dvm.py", line 3150, in get_raw
    [ x.get_raw() for x in self.map_item ]
  File ".//core/bytecodes/dvm.py", line 2959, in get_raw
    return [ bytecode.Buff( self.__offset.off, self.format.get_value_buff() ) ] + [ i.get_raw() for i in self.item ]
  File ".//core/bytecodes/dvm.py", line 1333, in get_raw
    return [ bytecode.Buff(self.__offset.off, self.visibility.get_value_buff()) ] + self.annotation.get_raw()
  File ".//core/bytecodes/dvm.py", line 1312, in get_raw
    [ i.get_raw() for i in self.elements ]
  File ".//core/bytecodes/dvm.py", line 1287, in get_raw
    return [ bytecode.Buff(self.__offset.off, writeuleb128(self.name_idx) + self.value.get_raw()) ]
  File ".//core/bytecodes/dvm.py", line 1269, in get_raw
    return self.val.get_value_buff() + self.value.get_raw()

What version of the product are you using? On what operating system?
I am using androguard 0.9. on Ubuntu 11.04

Please provide any additional information below.

Original issue reported on code.google.com by haoh...@gmail.com on 3 Feb 2012 at 9:23

GoogleCodeExporter commented 9 years ago
Yes this bug has been fix in mercurial version

Thx

Original comment by anthony....@gmail.com on 3 Feb 2012 at 10:27