From a086683ecedef2be99b6717fb1afd4ccb5092784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Sat, 9 Feb 2013 15:04:41 +0100 Subject: [PATCH] Fixed setting a magic header to unreadable sectors in ntfsclone The magic header of an unreadable sectors should have the size of "BadSectoR", not the size of a pointer to it. --- ntfsprogs/ntfsclone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index a6309f69..1ea0e39d 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -677,7 +677,7 @@ static int io_all(void *fd, void *buf, int count, int do_write) static void rescue_sector(void *fd, off_t pos, void *buff) { - const char *badsector_magic = "BadSectoR\0"; + const char badsector_magic[] = "BadSectoR"; struct ntfs_device *dev = fd; if (opt.restore_image) {