mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-28 03:54:18 +01:00
faf5063818
idaapi.cvar.database_idb seems to point to a realloc'ed buffer. When IDA is working on an IDB stored in a directory with a long path and a second IDB with a shorter path is loaded, the buffer will be overwritten with the new path to the IDB, which will end in "\x00" and the leftovers of the older, longer path will follow. The problem with GetIdbPath() is that it returns the whole bufer, NULL and "leftovers" included, which leads to trouble in Python. Specifically some functions like os.path.splitext which will look for the extension starting from the end of the buffer and will return an invalid split. The patch simply post-processes the contents of idaapi.cvar.database_idb returning a Python string with all characters up to the "\x00" |
||
---|---|---|
.. | ||
idautils.py | ||
idc.py | ||
init.py |