linux-mips
[Top] [All Lists]

Re: [PATCH] MIPS: move mips_{set,get}_machine_name() to a more generic p

To: Gabor Juhos <juhosg@openwrt.org>
Subject: Re: [PATCH] MIPS: move mips_{set,get}_machine_name() to a more generic place
From: John Crispin <john@phrozen.org>
Date: Fri, 12 Apr 2013 19:46:10 +0200
Cc: John Crispin <blogic@openwrt.org>, Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <516845AB.8080109@openwrt.org>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1365662099-3981-1-git-send-email-blogic@openwrt.org> <516845AB.8080109@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:12.0) Gecko/20120428 Thunderbird/12.0.1
Am 4/12/13 7:34 PM, schrieb Gabor Juhos:
Any specific reason why you are using snprintf? If someone would call this with
format characters in the 'name' that would cause weird things.
strncpy makes more sense indeed. the code i copied used strdup, which failed as memory was not available at the time the code ran



<Prev in Thread] Current Thread [Next in Thread>