]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[27303] Supply format string as first arg to printf()
authorMukund Sivaraman <muks@isc.org>
Sun, 8 Jun 2014 13:36:37 +0000 (19:06 +0530)
committerMukund Sivaraman <muks@isc.org>
Sun, 8 Jun 2014 13:36:37 +0000 (19:06 +0530)
No CHANGES entry for this as it isn't proved to cause an issue for
anyone (isc_msgcat_get() has to return a format specifier) and isn't a
user visible change.

Squashed commit of the following:

commit bcb15c9aa17b0b706aefd9efef5f7e0e951064a3
Author: Mukund Sivaraman <muks@isc.org>
Date:   Wed Jun 4 16:55:16 2014 +0530

    [27303] Supply format string as first arg to printf()

    The old code only had a problem if isc_msgcat_get() returned a format
    specifier (%n).

lib/isc/unix/ifiter_sysctl.c

index 102ecc1fee2896173ac43a3e7cf61ee6665752f4..5aad3d2ab82881d9f598482a0faf2af67a68d0ac 100644 (file)
@@ -258,7 +258,8 @@ internal_current(isc_interfaceiter_t *iter) {
 
                return (ISC_R_SUCCESS);
        } else {
-               printf(isc_msgcat_get(isc_msgcat, ISC_MSGSET_IFITERSYSCTL,
+               printf("%s",
+                      isc_msgcat_get(isc_msgcat, ISC_MSGSET_IFITERSYSCTL,
                                      ISC_MSG_UNEXPECTEDTYPE,
                                      "warning: unexpected interface list "
                                      "message type\n"));