amirbijani / androguard

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

NoneType error in dataflow.py->clear_path #109

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. decompile e.g. the app "com.mobisystems.office" (OfficeSuite Viewer 6)

    c = androguard.decompiler.dad.decompile.DvClass(classItem, dx)
    c.process()

What is the expected output? What do you see instead?

Expected: Successful termination of c.process(), access to decompiled class 
source
Actual: NoneType error:

ERROR    analyser.call_function  - 'NoneType' object has no attribute 'ins_range'
Traceback (most recent call last):
  File "a.py", line 139, in call_function
    return fun(**args)
  File "andguard.py", line 327, in getSourceCodee
    name, curInterfaces, _, source = self._getSource(classes, self.vmx)
  File "/home/julian/projekte/appray/appray/src/detectors/andguard.py", line 458, in _getSource
    c.process()
  File "./androguard/decompiler/dad/decompile.py", line 197, in process
    self.process_method(meth)
  File "./androguard/decompiler/dad/decompile.py", line 186, in process_method
    meth.process()
  File "./androguard/decompiler/dad/decompile.py", line 102, in process
    register_propagation(graph, uses, defs)
  File "./androguard/decompiler/dad/dataflow.py", line 265, in register_propagation
    if not clear_path(graph, var2, loc + 1, i):
  File "./androguard/decompiler/dad/dataflow.py", line 199, in clear_path
    if not clear_path_node(graph, reg, loc1, node1.ins_range[1]):
AttributeError: 'NoneType' object has no attribute 'ins_range'

What version of the product are you using? On what operating system?
1.9 (rev. a1236a4a83e6)

Please provide any additional information below.
In dataflow.py:186, graph.get_node_from_loc(loc1) returns None (for loc1=38).

Original issue reported on code.google.com by julian.s...@gmx.net on 9 Feb 2013 at 11:13

GoogleCodeExporter commented 8 years ago

Original comment by anthony....@gmail.com on 10 Feb 2013 at 8:56

GoogleCodeExporter commented 8 years ago
fixed

Original comment by Lir...@gmail.com on 11 Feb 2013 at 6:23