Skip to content

Commit

Permalink
netfilter: nf_conntrack_dccp: use %s format string for buffer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Borkmann authored and Pablo Neira Ayuso committed Jan 6, 2014
1 parent 2a50d80 commit 138aef7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/netfilter/nf_conntrack_proto_dccp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 138aef7

Please sign in to comment.