From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] drivers/staging/irda: fix max dup length for kstrndup Date: Tue, 12 Dec 2017 10:27:12 -0800 Message-ID: <20171212102712.40e7a652@xeon-e3> References: <20171212085444.15901-1-mashimiao.fnst@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: , , To: Ma Shimiao Return-path: In-Reply-To: <20171212085444.15901-1-mashimiao.fnst@cn.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Tue, 12 Dec 2017 16:54:44 +0800 Ma Shimiao wrote: > If source string longer than max, kstrndup will alloc max+1 space. > So, we should make sure the result will not over limit. > > Signed-off-by: Ma Shimiao Did you read the TODO file in drivers/staging/irda? The irda code will be removed soon from the kernel tree as it is old and obsolete and broken. Don't worry about fixing up anything here, it's not needed.