[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1392134485.29083.YahooMailNeo@web125506.mail.ne1.yahoo.com>
Date: Tue, 11 Feb 2014 08:01:25 -0800 (PST)
From: François-Xavier Le Bail <fx.lebail@...oo.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: NETDEV <netdev@...r.kernel.org>, David Miller <davem@...emloft.net>
Subject: Re: [PATCH] net: rtnetlink: fix correct size given to memset
> From: Eric Dumazet <eric.dumazet@...il.com>
> To: Francois-Xavier Le Bail <fx.lebail@...oo.com>
>> Find by cppcheck:
>> [net/core/rtnetlink.c:1842]: (warning) Using size of pointer linkinfo
> instead of size of its data.
>>
>> Signed-off-by: Francois-Xavier Le Bail <fx.lebail@...oo.com>
>> ---
>>
>> The diagnosis of cppcheck seems relevant.
>>
>> net/core/rtnetlink.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
> This is absolutely wrong.
>
> struct nlattr *linkinfo[IFLA_INFO_MAX+1];
>
> sizeof(linkinfo) is totally appropriate
>
> sizeof(*linkinfo) is equal to sizeof(void *), and this is not what we
> need here.
Oops, sorry for the noise.
--
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