Blob Blame History Raw
diff -rup libvirt-0.3.1.orig/src/qemu_conf.c libvirt-0.3.1.new/src/qemu_conf.c
--- libvirt-0.3.1.orig/src/qemu_conf.c	2007-07-24 11:06:38.000000000 -0400
+++ libvirt-0.3.1.new/src/qemu_conf.c	2007-07-26 10:22:09.000000000 -0400
@@ -1088,6 +1088,10 @@ static struct qemud_vm_def *qemudParseXM
     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;