]> xenbits.xensource.com Git - qemu-xen-3.4-testing.git/commitdiff
Always treat floppy images as raw
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 10 Dec 2008 15:30:49 +0000 (15:30 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 10 Dec 2008 15:30:49 +0000 (15:30 +0000)
The fix for the image format guessing vulnerability breaks raw floppy
images.  In our environment it is difficult to apply the same
configuration change as envisaged upstream, so instead we arrange to
always treat a floppy image as raw.

Two-line patch supplied by James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
vl.c

diff --git a/vl.c b/vl.c
index 5cb54cfa412bdc5f9a7a5462223e885273e6887b..99ebd9de8330288db09e5c04425b1aefd782222c 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -5847,6 +5847,8 @@ static int drive_init(struct drive_opt *arg, int snapshot,
            approximation.  */
     case IF_FLOPPY:
         bdrv_set_type_hint(bdrv, BDRV_TYPE_FLOPPY);
+        if (!drv)
+            drv = &bdrv_raw;
         break;
     case IF_PFLASH:
     case IF_MTD: