Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 2013 22:55:56 +0000 (UTC)
From:      Sean Bruno <sbruno@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r256866 - head/contrib/gcclibs/libssp
Message-ID:  <201310212255.r9LMtuSX014524@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sbruno
Date: Mon Oct 21 22:55:56 2013
New Revision: 256866
URL: http://svnweb.freebsd.org/changeset/base/256866

Log:
  Resolve clang warning about a use of syslog. By using a proper enforcement
  of string format in a call so syslog
  
  /usr/src/gnu/lib/libssp/../../../contrib/gcclibs/libssp/ssp.c:137:23:
  warning: format string is not a string literal (potentially insecure)
        [-Wformat-security]
      syslog (LOG_CRIT, msg1);
                        ^~~~
  
  Reviewed by:	dim@

Modified:
  head/contrib/gcclibs/libssp/ssp.c

Modified: head/contrib/gcclibs/libssp/ssp.c
==============================================================================
--- head/contrib/gcclibs/libssp/ssp.c	Mon Oct 21 22:43:38 2013	(r256865)
+++ head/contrib/gcclibs/libssp/ssp.c	Mon Oct 21 22:55:56 2013	(r256866)
@@ -128,7 +128,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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310212255.r9LMtuSX014524>