PhotoRec: stricter check for .arj
This commit is contained in:
parent
8ebbe0e42e
commit
41f3bd9b40
1 changed files with 2 additions and 0 deletions
|
@ -129,8 +129,10 @@ static int header_check_arj(const unsigned char *buffer, const unsigned int buff
|
|||
{
|
||||
const struct arj_main_header *arj=(const struct arj_main_header*)buffer;
|
||||
if(memcmp(buffer, arj_header, sizeof(arj_header))==0 &&
|
||||
le16(arj->basic_header_size) > 0 &&
|
||||
le16(arj->basic_header_size) <= 2600 &&
|
||||
arj->archiver_ver_min <= arj->archiver_ver &&
|
||||
arj->archiver_ver <=12 &&
|
||||
(arj->flags&0x01)==0 &&
|
||||
arj->file_type==2)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue