summaryrefslogtreecommitdiffstats
path: root/src/file_jpg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2015-12-22 15:25:03 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2015-12-22 15:25:03 +0100
commitf73ae37ab82c8968f00ccbd360baa776c7873d4b (patch)
tree4fede0defe07019b954effcf4778d06cb3c37070 /src/file_jpg.c
parentc19ec047b8d6e7ca6dedd787098ef692ce3e75fd (diff)
PhotoRec: fix when carving jpg with blocksize forced to 1 byte
Diffstat (limited to 'src/file_jpg.c')
-rw-r--r--src/file_jpg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/file_jpg.c b/src/file_jpg.c
index 4665836..317c18b 100644
--- a/src/file_jpg.c
+++ b/src/file_jpg.c
@@ -1656,6 +1656,8 @@ static void file_check_jpg(file_recovery_t *file_recovery)
{
uint64_t thumb_offset;
static uint64_t thumb_error=0;
+ if(file_recovery->calculated_file_size<=2)
+ file_recovery->calculated_file_size=0;
/* FIXME REMOVE ME */
file_recovery->flags=1;
file_recovery->file_size=0;