[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.01.1206041513400.16684@frira.zrqbmnf.qr>
Date: Mon, 4 Jun 2012 15:16:11 +0200 (CEST)
From: Jan Engelhardt <jengelh@...i.de>
To: Joe Perches <joe@...ches.com>
cc: pablo@...filter.org, netfilter-devel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 3/7] netfilter: nf_ct_helper: implement variable length
helper private data
On Monday 2012-06-04 15:09, Joe Perches wrote:
>On Mon, 2012-06-04 at 15:06 +0200, Jan Engelhardt wrote:
>> On Monday 2012-06-04 14:21, pablo@...filter.org wrote:
>
>> >@@ -218,13 +221,13 @@ int __nf_ct_try_assign_helper(struct nf_conn *ct, struct nf_conn *tmpl,
>> > }
>> >
>> > if (help == NULL) {
>> >- help = nf_ct_helper_ext_add(ct, flags);
>> >+ help = nf_ct_helper_ext_add(ct, helper, flags);
>> > if (help == NULL) {
>> > ret = -ENOMEM;
>> > goto out;
>> > }
>> > } else {
>> >- memset(&help->help, 0, sizeof(help->help));
>> >+ memset(&help->data, 0, sizeof(helper->data_len));
>> > }
>>
>> memset(help->data, 0, sizeof(helper->data_len));
>
> memset(help->data, 0, helper->data_len);
I knew this looked suspect. With so many "sizeof"s, this spot was
starting to look like a "mine is bigger" competition.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists