]> git.ipfire.org Git - thirdparty/qemu.git/commit
qemu-char: Check for missing backend name
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Sat, 22 Jan 2011 13:07:26 +0000 (13:07 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Sun, 20 Feb 2011 17:26:41 +0000 (18:26 +0100)
commit8d610b6ba2b36bbe0159362556455b61c6566526
tree1c22601402b026b55a93a0ea335749457f68d609
parent0850f81099cff3a37434352455ffbe831e7f62ae
qemu-char: Check for missing backend name

Check if the backend option is missing before searching the backend
table.  This fixes a NULL pointer dereference when QEMU is invoked with
the following invalid command-line:

  $ qemu -chardev id=foo,path=/tmp/socket

Previously QEMU would segfault, now it produces this error message:

  chardev: "foo" missing backend

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qemu-char.c