[pkg-ntp-maintainers] Bug#653771: Bug#653771: FTBFS on kfreebsd-* due to -Wformat-security

Peter Eisentraut petere at debian.org
Tue Jan 3 21:51:10 UTC 2012


I think the below is a more correct fix.  Could you check whether it
works for you?

--- a/ntpd/refclock_oncore.c
+++ b/ntpd/refclock_oncore.c
@@ -4058,7 +4058,7 @@ oncore_log (
 
        snprintf(Msg, sizeof(Msg), "ONCORE[%d]: %s", instance->unit,
                 msg);
-       syslog(log_level, Msg);
+       syslog(log_level, "%s", Msg);
 
        i = strlen(msg);
 
--- a/lib/isc/include/isc/msgcat.h
+++ b/lib/isc/include/isc/msgcat.h
@@ -110,7 +110,7 @@ isc_msgcat_close(isc_msgcat_t **msgcatp)
 
 const char *
 isc_msgcat_get(isc_msgcat_t *msgcat, int set, int message,
-              const char *default_text);
+              const char *default_text) __attribute__((format_arg(4)));
 /*%<
  * Get message 'message' from message set 'set' in 'msgcat'.  If it
  * is not available, use 'default_text'.







More information about the pkg-ntp-maintainers mailing list