netfilter: nf_conntrack_dccp: use %s format string for buffer
authorDaniel Borkmann <dborkman@redhat.com>
Mon, 6 Jan 2014 00:04:16 +0000 (01:04 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 6 Jan 2014 13:19:16 +0000 (14:19 +0100)
Some invocations of nf_log_packet() use arg buffer directly instead of
"%s" format string with follow-up buffer pointer. Currently, these two
usages are not really critical, but we should fix this up nevertheless
so that we don't run into trouble if that changes one day.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_proto_dccp.c

index a99b6c3427b0ce3e06458cb1fd37bc3bfac98723..38412684a8824463e99f9fc46111a7874013c1bb 100644 (file)
@@ -457,7 +457,7 @@ static bool dccp_new(struct nf_conn *ct, const struct sk_buff *skb,
 out_invalid:
        if (LOG_INVALID(net, IPPROTO_DCCP))
                nf_log_packet(net, nf_ct_l3num(ct), 0, skb, NULL, NULL,
-                             NULL, msg);
+                             NULL, "%s", msg);
        return false;
 }
 
@@ -614,7 +614,7 @@ static int dccp_error(struct net *net, struct nf_conn *tmpl,
 
 out_invalid:
        if (LOG_INVALID(net, IPPROTO_DCCP))
-               nf_log_packet(net, pf, 0, skb, NULL, NULL, NULL, msg);
+               nf_log_packet(net, pf, 0, skb, NULL, NULL, NULL, "%s", msg);
        return -NF_ACCEPT;
 }