summaryrefslogtreecommitdiffstats
path: root/src/file_dbf.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-03-12 13:14:33 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2014-03-12 13:14:33 +0100
commit682a7e810887ca1809b334b6242d0cf1ac7d50f6 (patch)
tree9922ec6698cb703c4318222e6a3bdaff8647f7e9 /src/file_dbf.c
parent518e34a8e06fd1850d016b212d16c53fc1b57ea1 (diff)
header_check_dbf:fix year check again
see previous commit d4ad15178882c3570cad9908a88ad75328b6d918
Diffstat (limited to 'src/file_dbf.c')
-rw-r--r--src/file_dbf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_dbf.c b/src/file_dbf.c
index f7a4180..c24a3a7 100644
--- a/src/file_dbf.c
+++ b/src/file_dbf.c
@@ -53,7 +53,7 @@ static void register_header_check_dbf(file_stat_t *file_stat)
static int header_check_dbf(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)
{
/* 0x03 YY MM DD reserved=0 */
- if(buffer[0]==0x3 && (buffer[1]>80 && buffer[1]<120) &&
+ if(buffer[0]==0x3 && ((buffer[1]>80 && buffer[1]<120) || buffer[1]<20) &&
(buffer[2]>=1 && buffer[2]<=12) && (buffer[3]>=1 && buffer[3]<=31) &&
buffer[12]==0 && buffer[13]==0 && buffer[14]==0 && buffer[15]==0 &&
buffer[16]==0 && buffer[17]==0 && buffer[18]==0 && buffer[19]==0 &&