Signed-off-by: River Chiang <riverchi...@gmail.com>

---------------------------------- 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