qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Prevent overriding the input file with the output file when


From: River Chiang
Subject: [Qemu-devel] Prevent overriding the input file with the output file when using qemu-img
Date: Mon, 22 Jan 2018 23:40:04 -0500

    Signed-off-by: River Chiang <address@hidden>

---------------------------------- qemu-img.c
----------------------------------
index 68b375f998..5ce594ea00 100644
@@ -2098,6 +2098,9 @@ static int img_convert(int argc, char **argv)
     if (s.src_num < 1) {
         error_report("Must specify image file name");
         goto fail_getopt;
+    } else if (!strcmp(argv[optind], out_filename)) {
+        error_report("Override the input file with the output file");
+        goto fail_getopt;
     }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]