summaryrefslogtreecommitdiffstats
path: root/src/file_jpg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-02-11 19:26:28 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2012-02-11 19:26:28 +0100
commitc30446d129147e97e485cbf383caa8d32e0ae018 (patch)
treee3b187b842854fcda799e34bf0ad21a89e656973 /src/file_jpg.c
parent8b12fd3d04bd4d4914fee6530d770c9171ea4bc4 (diff)
PhotoRec: Some JPG have two APP1 markers, avoid to dicard the first one - part 2
Diffstat (limited to 'src/file_jpg.c')
-rw-r--r--src/file_jpg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file_jpg.c b/src/file_jpg.c
index 5928bc7..f3f5d8f 100644
--- a/src/file_jpg.c
+++ b/src/file_jpg.c
@@ -1107,7 +1107,8 @@ static uint64_t jpg_check_structure(file_recovery_t *file_recovery, const unsign
for(offset=file_recovery->blocksize; offset < nbytes && file_recovery->offset_error==0; offset+=file_recovery->blocksize)
{
if(buffer[offset]==0xff && buffer[offset+1]==0xd8 && buffer[offset+2]==0xff &&
- (buffer[offset+3]==0xe1 || buffer[offset+3]==0xec))
+ ((buffer[offset+3]==0xe1 && memcmp(&buffer[offset+6], "http://ns.adobe.com/xap/", 24)!=0)
+ || buffer[offset+3]==0xec))
{
file_recovery->offset_error=offset;
}