From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw4Zy-0002Yc-IT for qemu-devel@nongnu.org; Fri, 29 Apr 2016 05:19:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aw4Zs-0000hZ-Bz for qemu-devel@nongnu.org; Fri, 29 Apr 2016 05:19:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aw4Zs-0000hM-7G for qemu-devel@nongnu.org; Fri, 29 Apr 2016 05:19:12 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D32CEC062C90 for ; Fri, 29 Apr 2016 09:19:10 +0000 (UTC) From: Markus Armbruster Date: Fri, 29 Apr 2016 11:19:08 +0200 Message-Id: <1461921548-3332-2-git-send-email-armbru@redhat.com> In-Reply-To: <1461921548-3332-1-git-send-email-armbru@redhat.com> References: <1461921548-3332-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PULL for-2.6 1/1] qapi: Don't pass NULL to printf in string input visitor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Eric Blake Make sure the error message for visit_type_uint64() gracefully handles a NULL 'name' when called from the top level or a list context, as not all the world behaves like glibc in allowing NULL through a printf-family %s. Signed-off-by: Eric Blake Message-Id: <1461879932-9020-21-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster --- qapi/string-input-visitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/string-input-visitor.c b/qapi/string-input-visitor.c index ab12953..5ea2d77 100644 --- a/qapi/string-input-visitor.c +++ b/qapi/string-input-visitor.c @@ -222,7 +222,7 @@ static void parse_type_int64(Visitor *v, const char *name, int64_t *obj, return; error: - error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name, + error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name ? name : "null", "an int64 value or range"); } -- 2.5.5