KeePassX 2.0 and GitHub master crash when trying to import a .kdb file
I discovered a crash in the 'Import KeePass 1 database' function. It occurs immediately after entering the correct master password.
I analyzed the crash using GDB (a full backtrace is attached) and came to a conclusion that it is caused by an integer overflow in KeePass1Reader::parseCustomIcons4().
Not sure, if this is a real bug or a consequence of my .kdb file being broken. Anyway, application of a simple patch (see attachment) allowed me to successfully import the database.
Fix crash when icon id is larger than INT_MAX.
In these cases icon id was interpreted as a negative number.
The QList access with a negative index resulted in a crash.