Review Request 128295: fix base64 decoding on ARM

Rolf Eike Beer kde at opensource.sf-tec.de
Mon Jun 27 16:24:40 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/128295/
-----------------------------------------------------------

(Updated June 27, 2016, 6:24 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Frameworks.


Changes
-------

Submitted with commit 601fd3a05141c614ae48a3ddac44194d669eaae1 by Rolf Eike Beer to branch master.


Bugs: 364495
    http://bugs.kde.org/show_bug.cgi?id=364495


Repository: qca


Description
-------

This code was broken on ARM and other architectures where "char" is unsigned by default.

First, it breaks with newer compilers with errors like:

  .../src/qca_textfilter.cpp:314:2: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]

Second, if the compiler would just allow this conversion then the unsigned char would hold 255, which would not be sign extended when cast to an int later, so all the checks "< 0" will never trigger, and so invalid input characters cannot be detected.


Diffs
-----

  src/qca_textfilter.cpp 9889a24 

Diff: https://git.reviewboard.kde.org/r/128295/diff/


Testing
-------

Builds without error on newer gcc now.


Thanks,

Rolf Eike Beer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160627/b388acf5/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list