Summary: | Compilation for ARM fails with Qt 5.7.0 because of narrowing conversion: | ||
---|---|---|---|
Product: | [Frameworks and Libraries] qca | Reporter: | Rolf Eike Beer <kde> |
Component: | general | Assignee: | Ivan Romanov <drizt72> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bradh, justin |
Priority: | NOR | ||
Version: | 2.1.1 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/qca/601fd3a05141c614ae48a3ddac44194d669eaae1 | Version Fixed In: | |
Sentry Crash Report: |
Description
Rolf Eike Beer
2016-06-19 10:43:35 UTC
Git commit 601fd3a05141c614ae48a3ddac44194d669eaae1 by Rolf Eike Beer. Committed on 27/06/2016 at 16:24. Pushed by dakon into branch 'master'. fix base64 decoding on ARM 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. REVIEW:128295 M +1 -1 src/qca_textfilter.cpp http://commits.kde.org/qca/601fd3a05141c614ae48a3ddac44194d669eaae1 |