From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 27 May 2013 12:42:57 +0200 (CEST) Received: from nbd.name ([46.4.11.11]:44199 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6823668Ab3E0Kmwthv-X (ORCPT ); Mon, 27 May 2013 12:42:52 +0200 Message-ID: <51A33787.8080301@openwrt.org> Date: Mon, 27 May 2013 12:37:59 +0200 From: John Crispin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 CC: linux-mips@linux-mips.org Subject: Re: [PATCH] arch: mips: ralink: using strlcpy() instead of strncpy() References: <51A1C16A.6050808@asianux.com> In-Reply-To: <51A1C16A.6050808@asianux.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: unlisted-recipients:; (no To-header on input) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 36605 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: blogic@openwrt.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On 26/05/13 10:01, Chen Gang wrote: > 'compatible' is used by strlen() in __of_device_is_compatible(). > > So for NUL terminated string, need always be sure of ended by zero. > > 'of_ids' is not a structure in "include/uapi/*", so not need initialize > all bytes, just use strlcpy() instead of strncpy(). > > > Signed-off-by: Chen Gang Acked-by: John Crispin From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from nbd.name ([46.4.11.11]:44199 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S6823668Ab3E0Kmwthv-X (ORCPT ); Mon, 27 May 2013 12:42:52 +0200 Message-ID: <51A33787.8080301@openwrt.org> Date: Mon, 27 May 2013 12:37:59 +0200 From: John Crispin MIME-Version: 1.0 Subject: Re: [PATCH] arch: mips: ralink: using strlcpy() instead of strncpy() References: <51A1C16A.6050808@asianux.com> In-Reply-To: <51A1C16A.6050808@asianux.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: Cc: linux-mips@linux-mips.org Message-ID: <20130527103759.3skvpCs-PNtfYFtgAwBACOZ-DhYyIEAFmTw3bAMc4jA@z> On 26/05/13 10:01, Chen Gang wrote: > 'compatible' is used by strlen() in __of_device_is_compatible(). > > So for NUL terminated string, need always be sure of ended by zero. > > 'of_ids' is not a structure in "include/uapi/*", so not need initialize > all bytes, just use strlcpy() instead of strncpy(). > > > Signed-off-by: Chen Gang Acked-by: John Crispin