src/file_asf.c: header check was too strong and rejecting valid files.

This commit is contained in:
Christophe Grenier 2020-10-11 11:02:53 +02:00
parent 13cb4c5048
commit 895c3d2606

View file

@ -81,7 +81,7 @@ static int header_check_asf(const unsigned char *buffer, const unsigned int buff
uint64_t offset_prop=sizeof(struct asf_header_obj_s); uint64_t offset_prop=sizeof(struct asf_header_obj_s);
/* Header + File Properties + Stream Properties + Header Extension */ /* Header + File Properties + Stream Properties + Header Extension */
if(le64(hdr->object_size)<30 || if(le64(hdr->object_size)<30 ||
le64(hdr->object_size)>buffer_size || le64(hdr->object_size) >= PHOTOREC_MAX_FILE_SIZE ||
nbr_header_obj<4) nbr_header_obj<4)
return 0; return 0;
for(i=0; for(i=0;