commit | e23a22e620e84f42bdbd473b82672654e7c8de73 | [log] [tgz] |
---|---|---|
author | Jens Osterkamp <jens@linux.vnet.ibm.com> | Mon Apr 12 10:51:01 2010 +0200 |
committer | Aurelien Jarno <aurelien@aurel32.net> | Tue May 18 19:49:16 2010 +0200 |
tree | ddc9cebadadc2810e1228759ab02ea575aa4d9ab | |
parent | 81bbe906c89b6b7af58a1eeb96ec5a0bfdc3386f [diff] |
qemu-sockets: avoid strlen of NULL pointer If the user wants to create a chardev of type socket but forgets to give a host= option, qemu_opt_get returns NULL. This NULL pointer is then fed into strlen a few lines below without a check which results in a segfault. This fixes it. Signed-off-by: Jens Osterkamp <jens@linux.vnet.ibm.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>