summaryrefslogtreecommitdiffstats
path: root/src/file_dwg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2011-10-10 08:00:57 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2011-10-10 08:00:57 +0200
commit8fa226e65b0c858cd57e825afad246046f580542 (patch)
tree44cd72222217859da1c64f26dd6f85c3a0ce8e6b /src/file_dwg.c
parentc1df348c11c617344cb351d07ee9b9b5f938bbd9 (diff)
PhotoRec: update dwg signature
Diffstat (limited to 'src/file_dwg.c')
-rw-r--r--src/file_dwg.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/file_dwg.c b/src/file_dwg.c
index aad02b8..8153915 100644
--- a/src/file_dwg.c
+++ b/src/file_dwg.c
@@ -47,6 +47,10 @@ static const unsigned char dwg_header_12[11]= {'A', 'C', '1', '0', '1', '2', 0x0
static const unsigned char dwg_header_13[11]= {'A', 'C', '1', '0', '1', '3', 0x00, 0x00, 0x00, 0x00, 0x00};
static const unsigned char dwg_header_14[11]= {'A', 'C', '1', '0', '1', '4', 0x00, 0x00, 0x00, 0x00, 0x00};
static const unsigned char dwg_header_15[11]= {'A', 'C', '1', '0', '1', '5', 0x00, 0x00, 0x00, 0x00, 0x00};
+static const unsigned char dwg_header_18[11]= {'A', 'C', '1', '0', '1', '8', 0x00, 0x00, 0x00, 0x00, 0x00};
+static const unsigned char dwg_header_21[11]= {'A', 'C', '1', '0', '2', '1', 0x00, 0x00, 0x00, 0x00, 0x00};
+static const unsigned char dwg_header_23[11]= {'A', 'C', '1', '0', '2', '3', 0x00, 0x00, 0x00, 0x00, 0x00};
+static const unsigned char dwg_header_24[11]= {'A', 'C', '1', '0', '2', '4', 0x00, 0x00, 0x00, 0x00, 0x00};
static void register_header_check_dwg(file_stat_t *file_stat)
{
@@ -54,6 +58,10 @@ static void register_header_check_dwg(file_stat_t *file_stat)
register_header_check(0, dwg_header_13,sizeof(dwg_header_13), &header_check_dwg, file_stat);
register_header_check(0, dwg_header_14,sizeof(dwg_header_14), &header_check_dwg, file_stat);
register_header_check(0, dwg_header_15,sizeof(dwg_header_15), &header_check_dwg, file_stat);
+ register_header_check(0, dwg_header_18,sizeof(dwg_header_18), &header_check_dwg, file_stat);
+ register_header_check(0, dwg_header_21,sizeof(dwg_header_21), &header_check_dwg, file_stat);
+ register_header_check(0, dwg_header_23,sizeof(dwg_header_23), &header_check_dwg, file_stat);
+ register_header_check(0, dwg_header_24,sizeof(dwg_header_24), &header_check_dwg, file_stat);
}
static int header_check_dwg(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)
@@ -61,7 +69,10 @@ static int header_check_dwg(const unsigned char *buffer, const unsigned int buff
if(memcmp(buffer,dwg_header_12,sizeof(dwg_header_12))==0 ||
memcmp(buffer,dwg_header_13,sizeof(dwg_header_13))==0 ||
memcmp(buffer,dwg_header_14,sizeof(dwg_header_14))==0 ||
- memcmp(buffer,dwg_header_15,sizeof(dwg_header_15))==0)
+ memcmp(buffer,dwg_header_15,sizeof(dwg_header_15))==0 ||
+ memcmp(buffer,dwg_header_18,sizeof(dwg_header_18))==0 ||
+ memcmp(buffer,dwg_header_21,sizeof(dwg_header_21))==0 ||
+ memcmp(buffer,dwg_header_24,sizeof(dwg_header_24))==0)
{
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_dwg.extension;