From c73b805062b9227f1cfe908bd3fab51be1c87041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Sat, 9 Feb 2013 15:01:36 +0100 Subject: [PATCH] Rejected reading a volume from stdin in ntfsclone Reading a volume must be done in a seekable way. Better throw a proper error. --- ntfsprogs/ntfsclone.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index d020586b..a6309f69 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -477,6 +477,11 @@ static void parse_options(int argc, char **argv) usage(); } + if (!opt.restore_image && !strcmp(opt.volume, "-")) { + err_printf("Only special images can be read from standard input\n"); + usage(); + } + if (opt.metadata && opt.save_image) { opt.metadata_image++; opt.save_image = 0;