visit_type_size() requires either visitor->type_size() or
visitor_uint64() to be implemented, otherwise a NULL function pointer is
invoked.
It is possible to trigger this crash as follows:
$ qemu-system-x86_64 -netdev tap,sndbuf=0,id=netdev0 \
-device virtio-blk-pci,netdev=netdev0
The 'sndbuf' option has type "size".
Reviewed-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
||
|---|---|---|
| .. | ||
| Makefile.objs | ||
| opts-visitor.c | ||
| opts-visitor.h | ||
| qapi-dealloc-visitor.c | ||
| qapi-dealloc-visitor.h | ||
| qapi-types-core.h | ||
| qapi-visit-core.c | ||
| qapi-visit-core.h | ||
| qapi-visit-impl.h | ||
| qmp-core.h | ||
| qmp-dispatch.c | ||
| qmp-input-visitor.c | ||
| qmp-input-visitor.h | ||
| qmp-output-visitor.c | ||
| qmp-output-visitor.h | ||
| qmp-registry.c | ||
| string-input-visitor.c | ||
| string-input-visitor.h | ||
| string-output-visitor.c | ||
| string-output-visitor.h | ||