In dalvik.cc::GetString, break loop if we reach an invalid address. #156
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I attempted to export a fairly large idb of a jar file and it was taking forever, as well as filling my RAM and swap to 100%, at which point the Linux kernel decided to terminate IDA Pro.
I started digging around the code and realized that either an invalid address was getting sent to
GetString, or I guess it was hitting an invalid address due to a non-null terminated string. In either case, it was causing an infinite loop.It turns out that if we pass an invalid address to
get_byte, it returns 0xFF, so I added that to the break condition which allowed me to export my database.I'm not sure this is the best fix because I'm getting the following error when trying to load the BinExport into python:
IPython traceback
It's not too bad because you can just:
But it's not ideal. Let me know if there is a better way to fix this. Perhaps use a different function from the IDA API,
get_bytes?