Add array bounds checking in xendDaemonListDomains

This commit is contained in:
Daniel P. Berrange 2006-12-07 18:23:19 +00:00
parent 17817e6a3d
commit 804e20e6c3
2 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,9 @@
Mon Dec 6 17:46:03 EST 2006 Daniel Berrange <berrange@redhat.com>
Thu Dec 7 12:28:03 EST 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Add bounds checking in xenDaemonListDomains to
avoid overflowing the 'ids' array.
Wed Dec 6 17:46:03 EST 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Support parsing of new paravirt framebuffer
graphics configuration from xen 3.0.4 tree.
@ -6,7 +11,7 @@ Mon Dec 6 17:46:03 EST 2006 Daniel Berrange <berrange@redhat.com>
config parsing in paravirt & fullyvirt.
* test/sexpr2xmldata/sexpr2xml-pv-vfb-*: New test data files
Mon Dec 6 17:40:03 EST 2006 Daniel Berrange <berrange@redhat.com>
Wed Dec 6 17:40:03 EST 2006 Daniel Berrange <berrange@redhat.com>
* test/xml2sexprdata/xml2sexpr-curmem.xml, test/xml2sexprdata/xml2sexpr-curmem.sexpr:
Fix test case to reflect recent change to bootloader/image handling

View File

@ -2625,7 +2625,9 @@ xenDaemonListDomains(virConnectPtr conn, int *ids, int maxids)
continue;
id = xenDaemonDomainLookupByName_ids(conn, node->value, NULL);
if (id >= 0)
ids[ret++] = (int) id;
ids[ret++] = (int) id;
if (ret >= maxids)
break;
}
error: