From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=45445 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQV4Q-0007Wy-C0 for qemu-devel@nongnu.org; Sun, 20 Jun 2010 20:41:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQV4P-0003B9-EO for qemu-devel@nongnu.org; Sun, 20 Jun 2010 20:41:02 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:57778) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQV4P-0003Ay-A7 for qemu-devel@nongnu.org; Sun, 20 Jun 2010 20:41:01 -0400 Received: by pvg2 with SMTP id 2so1047974pvg.4 for ; Sun, 20 Jun 2010 17:40:59 -0700 (PDT) Sender: Richard Henderson Message-ID: <4C1EB503.9030305@twiddle.net> Date: Sun, 20 Jun 2010 17:40:35 -0700 From: Richard Henderson MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH][RESEND] qdev-properties: Fix (u)intXX parsers References: <1276878423-19955-1-git-send-email-kwolf@redhat.com> In-Reply-To: <1276878423-19955-1-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On 06/18/2010 09:27 AM, Kevin Wolf wrote: > scanf calls must not use PRI constants, they have probably the wrong size and > corrupt memory. We could replace them by SCN ones, but strtol is simpler than > scanf here anyway. While at it, also fix the parsers to reject garbage after > the number ("4096xyz" was accepted before). > > Signed-off-by: Kevin Wolf > --- > hw/qdev-properties.c | 50 +++++++++++++++++++++++++++++++++++--------------- > 1 files changed, 35 insertions(+), 15 deletions(-) Acked-by: Richard Henderson r~