Igor Mammedov fc3b77e20d pc: fix possible NULL pointer dereference in pc_machine_get_device_memory_region_size()
QEMU will crash when device-memory-region-size property is read if ms->device_memory
wasn't initialized yet.

Crash can be reproduced with:
 $QEMU -preconfig -qmp unix:qmp_socket,server,nowait &
 ./scripts/qmp/qom-get -s qmp_socket /machine.device-memory-region-size

Instead of crashing return 0 if ms->device_memory hasn't been initialized.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20190624090200.5383-1-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2019-07-05 17:08:03 -03:00
..
2019-06-24 10:42:30 +01:00
2019-06-16 16:16:52 -04:00
2019-06-24 10:42:30 +01:00
2019-06-26 13:25:07 +02:00
2019-06-12 13:20:21 +02:00
2019-07-01 17:29:00 +01:00
2019-06-21 13:25:29 +02:00
2019-06-24 10:42:30 +01:00
2019-07-01 17:29:00 +01:00
2019-06-24 10:42:30 +01:00