Commit Graph
12 Commits
Author SHA1 Message Date
Dylan Pulver 31a4c9ddd4 Reject invalid padding in Base32::decode
decode() counted '=' anywhere in the last six characters and treated
any count outside {1,3,4,6} as unpadded. With two or five pad
characters nQuantumBytes became 0, so the output buffer was returned
with bytes that were never written, and the byte-extraction offset
became -8, shifting by a negative amount.

Count only the trailing run of pad characters, reject counts RFC 4648
does not allow, and reject a '=' that is not part of that run.
2026-09-01 11:12:39 -04:00
Sami Vänttinen 7c7ca4575e WIP: Qt6 transition (#11651)
Update KeePassXC to use Qt 6.
2026-05-04 15:16:51 +03:00
Rosen Penev 318157d242 clang-tidy: use braced init list (#7998) 2023-01-29 10:05:44 -05:00
peter 6b14b5dc27 Optimize includes across code base 2021-07-13 22:08:33 -04:00
Adolfo E. García c9895dd5c7 Improve Base32.cpp 2017-11-12 12:09:35 -06:00
Adolfo E. García 86cd2c09a4 Improve readability of code 2017-10-21 13:15:02 +02:00
Adolfo E. García f1d99dd0ed Improve testing of Base32 2017-10-21 13:15:02 +02:00
Adolfo E. García c731f8e5c0 Fix bug in Base32::decode and add bounds check
The bug that was fixed, was affecting how the number of bytes of decoded data was  calculated and thus, even though it didn't truncate the result, it was causing the array to be resized unnecessarily.
2017-10-21 13:15:02 +02:00
Adolfo E. García 24f560aaa2 Replace Optional with QVariant 2017-10-21 13:15:02 +02:00
Adolfo E. García d21ae0f94a Fix for loop's variable increment style 2017-10-21 13:15:02 +02:00
Adolfo E. García 95b0ad15ef Fix code style 2017-10-21 13:15:02 +02:00
Adolfo E. García 19eb6a8a60 Add new Base32 implementation 2017-10-21 13:15:02 +02:00