D19107: Write valid UTF8 characters without escaping.
Thiago Macieira
noreply at phabricator.kde.org
Tue Feb 19 15:35:15 GMT 2019
thiago added inline comments.
INLINE COMMENTS
> kconfigini.cpp:683
> + // When an additional byte leads to an invalid character, return false.
> + bool addByte(unsigned char b) {
> + if (count == 0) {
This function does operate properly to find valid syntax UTF-8 sequences, but it is neither catching overlong sequences nor UTF-8 content above U+10FFFF (UTF-8 can encode 0x11000 in 4 bytes).
See https://code.woboq.org/qt5/qtbase/tests/auto/corelib/codecs/utf8/utf8data.cpp.html#_Z19loadInvalidUtf8Rowsv for potential UTF-8 pitfalls.
REPOSITORY
R237 KConfig
REVISION DETAIL
https://phabricator.kde.org/D19107
To: vandenoever, dfaure, arichardson, apol, #frameworks, thiago
Cc: rapiteanu, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190219/57f2db63/attachment.html>
More information about the Kde-frameworks-devel
mailing list