Type library for certain std::string::operator+=(char*) has wrong number of arguments #6400
Labels
Component: Type Libraries
Effort: Low
Issue should take < 1 week
Impact: Medium
Issue is impactful with a bad, or no, workaround
Milestone
Version and Platform (required):
Bug Description:
Binary Ninja does not properly represent C++'s
+=
operator when acting on short strings.I'm seeing the decompiled result:
when I would expect something like:
Steps To Reproduce:
I've attached a
.zip
file with my writeup and the offending binary:issue-with-plus-equals.zip
This comes from this problem from CrackMes.
Note that all
.zip
files download from this website will have the password crackmes.one.To reproduce this issue, try to open the
crackme
binary, and read through thecheckPassword
function.Expected Behavior:
Binary Ninja should be able to represent instances where short strings are added to a C++ string object.
Screenshots:
Ghidra gets this correct. Lines 32 and 33 are what I would expect.
Binary Ninja does not properly represent this, meaning that the logic is obscured and the challenge is harder to complete.
Additional Information:
I'm still learning about Binary Ninja, so it's totally possible I'm doing something wrong.
The text was updated successfully, but these errors were encountered: