From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NnDXc-0005jV-NV for qemu-devel@nongnu.org; Thu, 04 Mar 2010 11:04:48 -0500 Received: from [199.232.76.173] (port=58590 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NnDXb-0005iz-TZ for qemu-devel@nongnu.org; Thu, 04 Mar 2010 11:04:48 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NnDXR-0001R1-I9 for qemu-devel@nongnu.org; Thu, 04 Mar 2010 11:04:47 -0500 Received: from oxygen.pond.sub.org ([213.239.205.148]:47488) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NnDXO-0001PX-Vv for qemu-devel@nongnu.org; Thu, 04 Mar 2010 11:04:35 -0500 Received: from blackfin.pond.sub.org (pD9E38041.dip.t-dialin.net [217.227.128.65]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 322FB2DD328 for ; Thu, 4 Mar 2010 17:04:31 +0100 (CET) From: Markus Armbruster Date: Thu, 4 Mar 2010 16:56:42 +0100 Message-Id: <1267718231-13303-22-git-send-email-armbru@redhat.com> In-Reply-To: <1267718231-13303-1-git-send-email-armbru@redhat.com> References: <1267718231-13303-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 21/50] QemuOpts: Fix qemu_config_parse() to catch file read errors List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Luiz Capitulino Signed-off-by: Markus Armbruster --- qemu-config.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 2de97cd..ad130fb 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -475,6 +475,10 @@ int qemu_config_parse(FILE *fp, const char *fname) error_report("parse error"); goto out; } + if (ferror(fp)) { + error_report("error reading file"); + goto out; + } res = 0; out: loc_pop(&loc); -- 1.6.6.1