summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2020-06-18 19:07:17 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2020-06-18 19:07:17 +0200
commit0ed7db8bc9a92aff19c2cdcdb81e215a49701aca (patch)
treec904d39c0f9f86a14fd095a4315c6f6db893f3ae
parent1fc9388c0d965beb1930544f793b4d56410d3c96 (diff)
src/file_bz2.c: stricter check in header_check_bz2()
-rw-r--r--src/file_bz2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_bz2.c b/src/file_bz2.c
index 05914f2..191bcd6 100644
--- a/src/file_bz2.c
+++ b/src/file_bz2.c
@@ -51,7 +51,7 @@ static void register_header_check_bz2(file_stat_t *file_stat)
static int header_check_bz2(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)
{
- if(buffer[0]=='B' && buffer[1]=='Z' && buffer[2]=='h' && buffer[3]>='0' && buffer[4]=='1' && buffer[5]=='A' && buffer[6]=='Y' && buffer[7]=='&' && buffer[8]=='S' && buffer[9]=='Y')
+ if(buffer[0]=='B' && buffer[1]=='Z' && buffer[2]=='h' && buffer[3]>='0' && buffer[3]<='9' && buffer[4]=='1' && buffer[5]=='A' && buffer[6]=='Y' && buffer[7]=='&' && buffer[8]=='S' && buffer[9]=='Y')
{
reset_file_recovery(file_recovery_new);
file_recovery_new->extension=file_hint_bz2.extension;