Review Request 128295: fix base64 decoding on ARM

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


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

Review request for KDE Frameworks.


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/59ee8aed/attachment.html>


More information about the Kde-frameworks-devel mailing list