Hello
I added TOTP Settings in the wrong order and every attempt to access affected entry resulted in the app crash. Looks like if entry is alone in the group even access to the group may cause the crash.
TOTP Secret field with any data (even empty works)TOTP Settings field with 6;30 (maybe different combinations works, don't know)Application works but doesn't show TOTP.
Application crashes with message
Unhandled exception at 0x00000000001F9611 in KeePassXC.exe: 0xC0000094: Integer division by zero.
KeePassXC - Version 2.6.0
Revision: 0765954
Qt 5.15.0
Debugging mode is disabled.
Operating system: Windows 10 Version 2004
CPU architecture: x86_64
Kernel: winnt 10.0.19041
Enabled extensions:
Cryptographic libraries:
libgcrypt 1.8.5
Operating System: Windows
Nice find! The crash occurs here:
https://github.com/keepassxreboot/keepassxc/blob/develop/src/totp/totp.cpp#L243
digitsPower overflows causing it to be 0. We need to add a bounds check to digits to ensure it is never greater than 10 (max TOTP length).
Thanks @droidmonkey for fast fix and the team for the great software!
Most helpful comment
Thanks @droidmonkey for fast fix and the team for the great software!