Closed HongThatCong closed 1 year ago
Hi! Unfortunately, it seems it's showing wrong lines right now for diaphora.py
. Would you mind please updating it?
I have (locally) fixed the problem with importing at instruction level. Thank you very much for reporting this! I will have to modify my testing suite to also test importing symbols.
UPDATE: I have just committed a fix for the part I can reproduce: 2f2c847c05292b192bedb06ce0019e290eb14d5b
The other issue being reported is where the unreliable
(and maybe partial
?) chooser can be None
.
For example, follow: self.add_matches_from_cursor_ratio_max to unreliable.add_item, partial.add_item, and partial.add_item. Other uses of add_matches_from_cursor_ratio_max
may require double-checking also.
Aaah, I see. Already fixed locally, I will commit later (whenever I have time).
In file diaphora_ida.py, I see there is a typo that has existed for a long time, from the first versions Function import_definitions type_name == "union" # == or = ????
Mother of $deity. That is a bug that has been there for $deity knows how long... Thanks a lot for reporting!
UPDATE: The bug is there because the testing suite doesn't have support for verifying that importing was correct. This has been also the reason of yet another bug.
Everything should be fixed with ebb3350ee9607705f46c9365fc74e20d93591f7a and 466c706e66cae53b85749b477a2cb0e3ea37f62e
AttributeError: 'NoneType' object has no attribute 'add_item'
partial is None at
https://github.com/joxeankoret/diaphora/blob/466c706e66cae53b85749b477a2cb0e3ea37f62e/diaphora.py#L1330
because partial = None
https://github.com/joxeankoret/diaphora/blob/466c706e66cae53b85749b477a2cb0e3ea37f62e/diaphora.py#L1816
same at
https://github.com/joxeankoret/diaphora/blob/466c706e66cae53b85749b477a2cb0e3ea37f62e/diaphora.py#L1878
I didn't read the code but I fix like ebb3350, it just work, but I don't know if it would break the code.
Ah, you're right. The thing is that these problems are fixed in my development branch, which greatly differs from the current public one, I have to manually port all the changes and... I missed various. Thanks for reporting! I will fix it 'soon'.
And done. Thank you very much for reporting!
Hi @joxeankoret I found some bugs in source files: diaphora.py and diaphora_ida.py
diaphora.py Form https://github.com/joxeankoret/diaphora/blob/a369c7caf119a7d6ad8414772b1f18f1b244c795/diaphora.py#L1335 to https://github.com/joxeankoret/diaphora/blob/a369c7caf119a7d6ad8414772b1f18f1b244c795/diaphora.py#L1349 unreliable and partial variable still None, cause Exception. Need check None.
diaphora_ida.py 2.1. import_instruction_level function: Line: https://github.com/joxeankoret/diaphora/blob/a369c7caf119a7d6ad8414772b1f18f1b244c795/diaphora_ida.py#L1365 Should be same as line https://github.com/joxeankoret/diaphora/blob/a369c7caf119a7d6ad8414772b1f18f1b244c795/diaphora_ida.py#L1387 Missing: "ins.operand_names operand_names" in sql statement
2.2. Line https://github.com/joxeankoret/diaphora/blob/a369c7caf119a7d6ad8414772b1f18f1b244c795/diaphora_ida.py#L1384 Should be same as line https://github.com/joxeankoret/diaphora/blob/a369c7caf119a7d6ad8414772b1f18f1b244c795/diaphora_ida.py#L1401
2.3. Need check operand_names is empty
Thanks you very much, @joxeankoret