DonnyBrasco25 / androguard

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

Instruction3rc has wrong register count on get_operands() #138

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What is the expected output? What do you see instead?
invoke-virtual/range v24 .. v25 @BBBB should have registers v24 and v25 listed 
in get_operands. but it only lists v24.

quick'n'dirty patch:

diff -r 1e64755cd512 androguard/core/bytecodes/dvm.py
--- a/androguard/core/bytecodes/dvm.py  Sun Mar 24 15:08:12 2013 -0700
+++ b/androguard/core/bytecodes/dvm.py  Tue Sep 03 12:15:01 2013 +0200
@@ -5131,7 +5131,7 @@
         return [(OPERAND_REGISTER, self.CCCC), (self.get_kind() + OPERAND_KIND, self.BBBB, kind)]
       else:
         l = []
-        for i in range(self.CCCC, self.NNNN):
+        for i in range(self.CCCC, self.NNNN+1):
           l.append((OPERAND_REGISTER, i))

         l.append((self.get_kind() + OPERAND_KIND, self.BBBB, kind))

What version of the product are you using? On what operating system?
latest hg

Original issue reported on code.google.com by 5hp...@gmail.com on 3 Sep 2013 at 10:18