From owner-svn-ports-all@freebsd.org Sat Apr 8 21:33:41 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D512D35E13; Sat, 8 Apr 2017 21:33:41 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53A629B; Sat, 8 Apr 2017 21:33:41 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v38LXekC067094; Sat, 8 Apr 2017 21:33:40 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v38LXeAI067093; Sat, 8 Apr 2017 21:33:40 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201704082133.v38LXeAI067093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Sat, 8 Apr 2017 21:33:40 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r438068 - head/devel/qca/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Apr 2017 21:33:41 -0000 Author: rakuco Date: Sat Apr 8 21:33:40 2017 New Revision: 438068 URL: https://svnweb.freebsd.org/changeset/ports/438068 Log: Add upstream patch to fix the build on ARMv6. PR: 217371 Submitted by: mikael.urankar@gmail.com MFH: 2017Q2 Added: head/devel/qca/files/patch-git_601fd3 (contents, props changed) Added: head/devel/qca/files/patch-git_601fd3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/qca/files/patch-git_601fd3 Sat Apr 8 21:33:40 2017 (r438068) @@ -0,0 +1,39 @@ +From 601fd3a05141c614ae48a3ddac44194d669eaae1 Mon Sep 17 00:00:00 2001 +From: Rolf Eike Beer +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 +