« Previous | Next » 

Revision e23a22e6

IDe23a22e620e84f42bdbd473b82672654e7c8de73

Added by Jens Osterkamp almost 14 years ago

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 <>
Signed-off-by: Aurelien Jarno <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences