qemu/hw/i386
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
..
kvm Include qemu/module.h where needed, drop it from qemu-common.h 2019-06-12 13:18:33 +02:00
xen hw/i386: Replace global smp variables with machine smp properties 2019-07-05 17:08:03 -03:00
acpi-build.c hw/i386: Replace global smp variables with machine smp properties 2019-07-05 17:08:03 -03:00
acpi-build.h Use scripts/clean-includes to drop redundant qemu/typedefs.h 2016-03-22 22:20:16 +01:00
amd_iommu.c Categorize devices: iommu 2019-04-25 14:52:28 -03:00
amd_iommu.h Clean up ill-advised or unusual header guards 2019-05-13 08:58:55 +02:00
fw_cfg.c hw/i386: Implement fw_cfg_arch_key_name() 2019-05-23 14:10:31 +02:00
fw_cfg.h hw/i386: Extract fw_cfg definitions to local "fw_cfg.h" 2019-05-23 14:10:31 +02:00
intel_iommu.c Categorize devices: iommu 2019-04-25 14:52:28 -03:00
intel_iommu_internal.h intel_iommu: Drop extended root field 2019-04-02 11:49:14 -04:00
Kconfig pc: Support for virtio-pmem-pci 2019-07-04 17:00:32 -04:00
kvmvapic.c hw/i386: Replace global smp variables with machine smp properties 2019-07-05 17:08:03 -03:00
Makefile.objs hw/i386: Implement fw_cfg_arch_key_name() 2019-05-23 14:10:31 +02:00
multiboot.c elf: Add optional function ptr to load_elf() to parse ELF notes 2019-02-05 16:50:16 +01:00
multiboot.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pc.c pc: fix possible NULL pointer dereference in pc_machine_get_device_memory_region_size() 2019-07-05 17:08:03 -03:00
pc_piix.c pc: Move compat_apic_id_mode variable to PCMachineClass 2019-07-04 17:00:32 -04:00
pc_q35.c hw: Nuke hw_compat_4_0_1 and pc_compat_4_0_1 2019-06-21 13:25:29 +02:00
pc_sysfw.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-events intel_iommu: Drop extended root field 2019-04-02 11:49:14 -04:00
vmmouse.c hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
vmport.c hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
x86-iommu.c x86-iommu: turn on IR by default if proper 2018-12-20 13:25:11 -05:00