From patchwork Sat Dec 7 08:13:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 298637 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 397DA2C00B9 for ; Sat, 7 Dec 2013 19:46:47 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=PODL4V7+V22v9Oy3uuPgiAGI+nPfCDLJ2CZDrexKyvB ixbt64pynfdWSgtERM5ZD7ex+1BwyraDtgFZHbwhJlJ/BA9A/fDzcjkKYJeYuIh4 uDM3edx/sL7lhsRpSFHXikHg4cQB/R6LD2PVvceEpsZeojwewZ4+fj1SfIWadaHM = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=5Dw8uT9NmDj/D7yCRVBwr0pb+gY=; b=QTjfmrCZZXd2fG1Zb BZKFfj+Ni7whI5prA2pxcjtlptXZeHggle262RNVTemxjppi3LPNmiqmkUZLtrgf 6oIMSF6WRLV5s792yrz4FiY7xWxgiKX1DBVH9nhBH6RrhRrcdlIF0ooKxIe6qa9B B4R87gwDiGfLmySLd/XXMuIGVs= Received: (qmail 15817 invoked by alias); 7 Dec 2013 08:46:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 15807 invoked by uid 89); 7 Dec 2013 08:46:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 07 Dec 2013 08:46:39 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB78kVlg026841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 7 Dec 2013 03:46:31 -0500 Received: from tucnak.zalov.cz (vpn1-5-23.ams2.redhat.com [10.36.5.23]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rB78E1Wn025498 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 7 Dec 2013 03:14:02 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.7/8.14.7) with ESMTP id rB78DxcD008673 for ; Sat, 7 Dec 2013 09:13:59 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.7/8.14.7/Submit) id rB78DxdZ008672 for gcc-patches@gcc.gnu.org; Sat, 7 Dec 2013 09:13:59 +0100 Date: Sat, 7 Dec 2013 09:13:59 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Avoid -Wformat-security warning in libssp Message-ID: <20131207081358.GZ892@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Hi! libssp apparently doesn't build with -Werror=format-security which is planned to be default for Fedora. While this is a false positive, msg3 is always one of two string literals, I think it doesn't hurt to use "%s" there. Committed to trunk as obvious. Jakub --- libssp/ChangeLog (revision 205753) +++ libssp/ChangeLog (working copy) @@ -1,3 +1,7 @@ +2013-12-07 Jakub Jelinek + + * ssp.c (fail): Avoid -Wformat-security warning. + 2013-09-20 Alan Modra * configure: Regenerate. --- libssp/ssp.c (revision 205753) +++ libssp/ssp.c (working copy) @@ -1,5 +1,5 @@ /* Stack protector support. - Copyright (C) 2005, 2009 Free Software Foundation, Inc. + Copyright (C) 2005-2013 Free Software Foundation, Inc. This file is part of GCC. @@ -136,7 +136,7 @@ fail (const char *msg1, size_t msg1len, #ifdef HAVE_SYSLOG_H /* Only send the error to syslog if there was no tty available. */ else - syslog (LOG_CRIT, msg3); + syslog (LOG_CRIT, "%s", msg3); #endif /* HAVE_SYSLOG_H */ /* Try very hard to exit. Note that signals may be blocked preventing