]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/arm_gic.c: Define .class_size in arm_gic_info TypeInfo
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 29 Aug 2012 07:52:37 +0000 (08:52 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 30 Aug 2012 19:54:16 +0000 (14:54 -0500)
commit450ead742ae119b9862c3385b9a27060c4364483
treef129dd6cc6aed5b83c35f8f1290dd009926e1ff2
parent69c67eca97298c37b084ddd6c961625079682579
hw/arm_gic.c: Define .class_size in arm_gic_info TypeInfo

Add the missing .class_size definition to the arm_gic_info TypeInfo.
This fixes the memory corruption and possible segfault that otherwise
results when the class struct is allocated at too small a size and
the class init function writes off the end of it.

Reported-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
(cherry picked from commit 998a74bcda7f3297813732ddc2f28ffe5a12e37a)

 - ARMGICClass isn't in 1.1, set class size to SysBusDeviceClass instead

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/arm_gic.c