From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Frederic Sowa Subject: Re: [PATCH -next] netrom: fix invalid use of sizeof in nr_recvmsg() Date: Tue, 9 Apr 2013 05:09:05 +0200 Message-ID: <20130409030905.GA2527@order.stressinduktion.org> References: Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-hams-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Wei Yongjun Cc: ralf@linux-mips.org, minipli@googlemail.com, davem@davemloft.net, yongjun_wei@trendmicro.com.cn, linux-hams@vger.kernel.org, netdev@vger.kernel.org On Tue, Apr 09, 2013 at 10:07:19AM +0800, Wei Yongjun wrote: > From: Wei Yongjun > > sizeof() when applied to a pointer typed expression gives the size of the > pointer, not that of the pointed data. > Introduced by commit 3ce5ef(netrom: fix info leak via msg_name in nr_recvmsg) I think it would be a good idea to enable -Wsizeof-pointer-memaccess (gcc 4.8 feature) by default. While enabled there were no additional warnings when I tested it some weeks ago. I will look into this.