svn commit: r256866 - head/contrib/gcclibs/libssp

Sean Bruno sbruno at FreeBSD.org
Mon Oct 21 22:55:56 UTC 2013


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


More information about the svn-src-head mailing list