From 7741daa06749cd687b592485adc916520b4ef84b Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Tue, 14 Apr 2015 07:54:46 +0200 Subject: [PATCH] PhotoRec: fix for qcow1 size detection --- src/file_cow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file_cow.c b/src/file_cow.c index 59d10ff8..3b694c24 100644 --- a/src/file_cow.c +++ b/src/file_cow.c @@ -78,7 +78,7 @@ typedef struct QCowHeader { static int header_check_qcow1(const unsigned char *buffer, const unsigned int buffer_size, const unsigned int safe_header_only, const file_recovery_t *file_recovery, file_recovery_t *file_recovery_new) { const QCowHeader_t *header=(const QCowHeader_t*)buffer; - uint64_t min_size=le64(header->backing_file_offset); + uint64_t min_size=be64(header->backing_file_offset); if(min_size < be64(header->l1_table_offset)) min_size=be64(header->l1_table_offset); reset_file_recovery(file_recovery_new);