[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 09/23] qapi: Don't pass NULL to printf in string
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH v2 09/23] qapi: Don't pass NULL to printf in string input visitor |
Date: |
Mon, 9 May 2016 13:07:53 +0100 |
From: Eric Blake <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
---
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
- [Qemu-devel] [PATCH v2 00/23] libqos: use standard virtio headers, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 01/23] hw/ppc/spapr: Fix crash when specifying bad parameters to spapr-pci-host-bridge, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 02/23] usb/uhci: move pid check, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 03/23] spapr_drc: fix aborts during DRC-count based hotplug, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 04/23] QemuOpts: Fix qemu_opts_foreach() dangling location regression, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 10/23] vvfat: Fix volume name assertion, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 07/23] target-mips: Fix RDHWR exception host PC, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 11/23] vvfat: Fix default volume label, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 12/23] acpi: fix bios linker loadder COMMAND_ALLOCATE on bigendian host, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 09/23] qapi: Don't pass NULL to printf in string input visitor,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v2 13/23] configure: Check if struct fsxattr is available from linux header, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 15/23] Update version for v2.6.0-rc4 release, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 14/23] Revert "acpi: mark PMTIMER as unlocked", Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 18/23] libqos: drop duplicated virtio_config.h definitions, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 17/23] libqos: drop duplicated PCI vendor ID definition, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 19/23] libqos: drop duplicated virtio_ring.h bit definitions, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 16/23] libqos: use virtio_ids.h for device ID definitions, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 22/23] libqos: drop duplicated virtio_scsi.h definitions, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 20/23] libqos: drop duplicated virtio_vring.h structs, Stefan Hajnoczi, 2016/05/09
- [Qemu-devel] [PATCH v2 23/23] libqos: drop duplicated virtio_pci.h definitions, Stefan Hajnoczi, 2016/05/09