diff --git a/ChangeLog b/ChangeLog index 39b10e9ecc28e97ad9eb862a2d42988faa3d662b..8e609f5c5195fae76240d70ca49208ece34c186b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jul 30 14:40:23 EST 2007 Daniel P. Berrange + + * src/qemu_conf.c: Validate requested architecture and reject + unsupported ones + Mon Jul 30 12:15:43 CEST 2007 Daniel Veillard * src/xen_internal.c: add report of ACPI/APIC for Xen fully virt, diff --git a/src/qemu_conf.c b/src/qemu_conf.c index fbd0ba3c6584029085d05d496728e2cbe8a10ed7..4f88d21ca7f12291437bff17f060acfb143c5a87 100644 --- a/src/qemu_conf.c +++ b/src/qemu_conf.c @@ -1102,6 +1102,10 @@ static struct qemud_vm_def *qemudParseXML(virConnectPtr conn, if ((obj == NULL) || (obj->type != XPATH_STRING) || (obj->stringval == NULL) || (obj->stringval[0] == 0)) { const char *defaultMachine = qemudDefaultMachineForArch(def->os.arch); + if (!defaultMachine) { + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "unsupported arch %s", def->os.arch); + goto error; + } if (strlen(defaultMachine) >= (QEMUD_OS_MACHINE_MAX_LEN-1)) { qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "%s", "machine type too long"); goto error;