From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chen Gang Subject: Re: [PATCH v2] arch: s390: appldata: using strncpy() and strnlen() instead of sprintf() Date: Tue, 28 May 2013 12:58:14 +0800 Message-ID: <51A43966.7080309@asianux.com> References: <51A2CC07.5010100@asianux.com> <51A32D81.2010105@asianux.com> <20130527182306.3bd8a252@thinkpad> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Return-path: Received: from intranet.asianux.com ([58.214.24.6]:46951 "EHLO intranet.asianux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932124Ab3E1E7G (ORCPT ); Tue, 28 May 2013 00:59:06 -0400 In-Reply-To: <20130527182306.3bd8a252@thinkpad> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Gerald Schaefer Cc: Geert Uytterhoeven , Martin Schwidefsky , Heiko Carstens , linux390@de.ibm.com, linux-s390@vger.kernel.org, Linux-Arch , "kernel-janitors@vger.kernel.org" On 05/28/2013 12:23 AM, Gerald Schaefer wrote: > On Mon, 27 May 2013 17:55:13 +0800 > Chen Gang wrote: > >> > >> > 'buf[2]' is 2 bytes length, and sprintf() will append '\0' at the end >> > of string "?\n", so original implementation is memory overflow. >> > >> > Need use strncpy() and strnlen() instead of sprintf(). >> > >> > >> > Signed-off-by: Chen Gang > Applied, thanks. > Thank you, too. -- Chen Gang Asianux Corporation