diff options
author | rakuco <rakuco@FreeBSD.org> | 2017-04-09 05:33:40 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2017-04-09 05:33:40 +0800 |
commit | 981c271cbb863bf08f62a3e364b71814045d6244 (patch) | |
tree | 620ef4dbeaf6afb6709574ec7e739c17854e7f93 | |
parent | 47dc4cb9007a94b11fb7378595985245a35d34f4 (diff) | |
download | freebsd-ports-gnome-981c271cbb863bf08f62a3e364b71814045d6244.tar.gz freebsd-ports-gnome-981c271cbb863bf08f62a3e364b71814045d6244.tar.zst freebsd-ports-gnome-981c271cbb863bf08f62a3e364b71814045d6244.zip |
Add upstream patch to fix the build on ARMv6.
PR: 217371
Submitted by: mikael.urankar@gmail.com
MFH: 2017Q2
-rw-r--r-- | devel/qca/files/patch-git_601fd3 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/devel/qca/files/patch-git_601fd3 b/devel/qca/files/patch-git_601fd3 new file mode 100644 index 000000000000..a4d53fbab9e1 --- /dev/null +++ b/devel/qca/files/patch-git_601fd3 @@ -0,0 +1,39 @@ +From 601fd3a05141c614ae48a3ddac44194d669eaae1 Mon Sep 17 00:00:00 2001 +From: Rolf Eike Beer <eb@emlix.com> +Date: Mon, 27 Jun 2016 12:55:51 +0200 +Subject: 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 +BUG:364495 +--- + src/qca_textfilter.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/qca_textfilter.cpp b/src/qca_textfilter.cpp +index 9889a24..3baf511 100644 +--- src/qca_textfilter.cpp ++++ src/qca_textfilter.cpp +@@ -293,7 +293,7 @@ static QByteArray b64decode(const QByteArray &s, bool *ok) + // 64 specifies eof + // everything else specifies data + +- static char tbl[] = ++ static signed char tbl[] = + { + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, +-- +cgit v0.11.2 + |