Summary: | Potential Buffer overflow inside ki18n KCatalog | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-ki18n | Reporter: | Alvin Wong <alvin> |
Component: | general | Assignee: | Chusslove Illich <caslav.ilic> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | amy, kdelibs-bugs |
Priority: | NOR | ||
Version: | 5.64.0 | ||
Target Milestone: | --- | ||
Platform: | Microsoft Windows | ||
OS: | Microsoft Windows | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | backtrace |
Description
Alvin Wong
2021-10-29 16:29:05 UTC
https://doc.qt.io/qt-5/qbytearray.html#qvsnprintf > Warning: Since vsnprintf() shows different behavior on certain platforms, you should not rely on the return value or on the fact that you will always get a 0 terminated string back. So that's known undefined behaviour. This has been broken from 5.20 onwards: https://invent.kde.org/frameworks/ki18n/-/commit/c2557d6d5ff9f8d4572b537a483740c17be59569 Reassigning to frameworks-ki18n. A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1131 Git commit 2face9aa95140b728daa26e67889e33d0d7487e4 by Halla Rempt, on behalf of Alvin Wong. Committed on 02/11/2021 at 12:37. Pushed by rempt into branch 'master'. ext_frameworks: Fix potential buffer overflow on Windows A +25 -0 3rdparty/ext_frameworks/0002-ki18n-Ensure-langenv-string-is-null-terminated.patch M +1 -0 3rdparty/ext_frameworks/CMakeLists.txt https://invent.kde.org/graphics/krita/commit/2face9aa95140b728daa26e67889e33d0d7487e4 Git commit 1841e77292801acd8f8c6ad9d1d62c9aba467d49 by Alvin Wong. Committed on 02/11/2021 at 15:10. Pushed by alvinwong into branch 'krita/5.0'. ext_frameworks: Fix potential buffer overflow on Windows (cherry picked from commit 2face9aa95140b728daa26e67889e33d0d7487e4) A +25 -0 3rdparty/ext_frameworks/0002-ki18n-Ensure-langenv-string-is-null-terminated.patch M +1 -0 3rdparty/ext_frameworks/CMakeLists.txt https://invent.kde.org/graphics/krita/commit/1841e77292801acd8f8c6ad9d1d62c9aba467d49 Git commit 241e0cfa96b1491721f361f1713b3514c58bde56 by Ahmad Samir. Committed on 05/09/2022 at 17:12. Pushed by ahmadsamir into branch 'master'. KCatalog: make setting LANGUAGE env var more robust - Use std::snprintf, since its docs state the resulting string will be null-terminated; also check the return value from that call to print warnings - Bump the size of the allocated char array to 64 Add rudimentary unittest adapted from kcountrytest.cpp. M +7 -3 autotests/CMakeLists.txt A +50 -0 autotests/kcatalogtest.cpp [License: LGPL(v2.0+)] M +17 -6 src/i18n/kcatalog.cpp https://invent.kde.org/frameworks/ki18n/commit/241e0cfa96b1491721f361f1713b3514c58bde56 |