From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36099 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHEYK-0002VU-SX for qemu-devel@nongnu.org; Wed, 26 May 2010 07:13:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHEYJ-0000ZI-NA for qemu-devel@nongnu.org; Wed, 26 May 2010 07:13:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61142) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHEYJ-0000Z2-E5 for qemu-devel@nongnu.org; Wed, 26 May 2010 07:13:35 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4QBDXeE026516 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 26 May 2010 07:13:34 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH] qdev-properties: Fix (u)intXX parsers References: <1274869693-22884-1-git-send-email-kwolf@redhat.com> Date: Wed, 26 May 2010 13:13:31 +0200 In-Reply-To: <1274869693-22884-1-git-send-email-kwolf@redhat.com> (Kevin Wolf's message of "Wed, 26 May 2010 12:28:13 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, kraxel@redhat.com Kevin Wolf writes: > 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). Do we have more misuse of PRI with scanf elsewhere? No need to fix them all in one commit (and thus delay this fix); I just want to make sure somebody looks.