From patchwork Sat Nov 9 23:03:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 901 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director7.mail.ord1d.rsapps.net ([172.31.255.6]) by backend30.mail.ord1d.rsapps.net with LMTP id oEViA9rgx13VNgAAIUCqbw for ; Sun, 10 Nov 2019 05:05:14 -0500 Received: from proxy3.mail.iad3b.rsapps.net ([172.31.255.6]) by director7.mail.ord1d.rsapps.net with LMTP id yI3WANrgx12KbgAAovjBpQ ; Sun, 10 Nov 2019 05:05:14 -0500 Received: from smtp32.gate.iad3b ([172.31.255.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy3.mail.iad3b.rsapps.net with LMTP id wIepNtngx13KJwAAM8Wetg ; Sun, 10 Nov 2019 05:05:13 -0500 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp32.gate.iad3b.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 960aa2f4-03a1-11ea-b300-5254006a2e70-1-1 Received: from [216.105.38.7] ([216.105.38.7:40782] helo=lists.sourceforge.net) by smtp32.gate.iad3b.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 0B/B5-28329-9D0E7CD5; Sun, 10 Nov 2019 05:05:13 -0500 Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1iTk4c-0007HM-Mh; Sun, 10 Nov 2019 10:03:58 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1iTk4b-0007HE-Id for openvpn-devel@lists.sourceforge.net; Sun, 10 Nov 2019 10:03:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iTDobpHsmHBHQ4Q38CK8OgUfIcA+GbKamdLoz4QMW2k=; b=TY1JuDpbXwkEtzLsRaAHAuFsXh f0pdL6oR6hS8WcHbC5Tx0QHGKoImjG13uz/eMVDbzyFkB65AbuFB5alFf0P/sF5YXSP+4f/klJ5fL 0H731iHt3Z16hJzz7EWzrkZ0qSRvmRaG8wLUtBo8mDQ5uOYyGP3nOpiDwEoRc8ijyLgk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=iTDobpHsmHBHQ4Q38CK8OgUfIcA+GbKamdLoz4QMW2k=; b=I DuPG/moDBx9ZQsj0uIcbKr0tfwz4bWP0Vy+JC+ZaD+9Nes2vIr2GC8toPRNShznOw7o1nTVF1iGw4 Wxj55Me6JELLzAvA6Ho4tMlox2zbd/2z6zNO2KpAoSzGDLLXzmR6zQa+JrDdLUNBWdV4SuEuOQ8/V D+IdzfPa59Oc+xqU=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1iTk4Y-00ANds-E7 for openvpn-devel@lists.sourceforge.net; Sun, 10 Nov 2019 10:03:57 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Sun, 10 Nov 2019 11:03:23 +0100 Message-Id: <20191110100323.13206-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [5.148.176.60 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1iTk4Y-00ANds-E7 Subject: [Openvpn-devel] [PATCH] add -Wno-stringop-truncation to CFLAGS on linux X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox GCC>=8 supports truncation checking, however the logic is somewhat fragile when it comes to evaluating strncpy(). In buffer.h we have implemented a wrapper called strncpynt() which ensures we always do the right hting in the code and reduce the chance of having bugs. This said, it seems that the gcc logic is not able to always understand if we are doing the right thing and throws a false positive. Toa void the noise, disable truncation checking on Linux by default. Signed-off-by: Antonio Quartulli Acked-by: Gert Doering --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 4159e450..807804e5 100644 --- a/configure.ac +++ b/configure.ac @@ -1283,6 +1283,7 @@ AC_DEFUN([ACL_CHECK_ADD_COMPILE_FLAGS], [ [AC_MSG_RESULT([no]); CFLAGS="$old_cflags"])] ) +ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-stringop-truncation]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-function]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wno-unused-parameter]) ACL_CHECK_ADD_COMPILE_FLAGS([-Wall])