From: Simon Horman Subject: Re: can-bcm: fix minor heap overflow Date: Fri, 12 Nov 2010 11:48:05 +0900 Message-ID: <20101112024805.GC24958@verge.net.au> References: <4CDB1856.4040001@hartkopp.net> <20101112023950.GA8145@verge.net.au> <1289529838.3090.209.camel@Dan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Oliver Hartkopp , David Miller , Linux Netdev List , Linus Torvalds , Urs Thuermann , security@kernel.org To: Dan Rosenberg Return-path: Received: from kirsty.vergenet.net ([202.4.237.240]:59803 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753962Ab0KLCsJ (ORCPT ); Thu, 11 Nov 2010 21:48:09 -0500 Content-Disposition: inline In-Reply-To: <1289529838.3090.209.camel@Dan> Sender: netdev-owner@vger.kernel.org List-ID: On Thu, Nov 11, 2010 at 09:43:58PM -0500, Dan Rosenberg wrote: > > > > > If the string may be up to 17 bytes long why are you allocating 20? > > > > In Oliver's defense, this doesn't matter even a little bit. The > structure will be allocated with kmalloc-1024 either way. I agree that its very unlikely to make any difference. I am just curious.