diff options
author | Thomas Huth | 2015-09-15 21:34:20 +0200 |
---|---|---|
committer | David Gibson | 2015-09-23 02:51:11 +0200 |
commit | ef001f069e0f175a036929782c5c63053df9569a (patch) | |
tree | 2bf211642512ebec996b2cc8c4dad7e6b786552e /include/hw/ppc/spapr.h | |
parent | spapr: Fix default NUMA node allocation for threads (diff) | |
download | qemu-ef001f069e0f175a036929782c5c63053df9569a.tar.gz qemu-ef001f069e0f175a036929782c5c63053df9569a.tar.xz qemu-ef001f069e0f175a036929782c5c63053df9569a.zip |
ppc/spapr: Fix buffer overflow in spapr_populate_drconf_memory()
The buffer that is allocated in spapr_populate_drconf_memory()
is used for setting both, the "ibm,dynamic-memory" and the
"ibm,associativity-lookup-arrays" property. However, only the
size of the first one is taken into account when allocating the
memory. So if the length of the second property is larger than
the length of the first one, we run into a buffer overflow here!
Fix it by taking the length of the second property into account,
too.
Fixes: "spapr: Support ibm,dynamic-reconfiguration-memory" patch
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr.h')
0 files changed, 0 insertions, 0 deletions