diff --git a/src/file_txt.c b/src/file_txt.c index 3afae337..78de7a21 100644 --- a/src/file_txt.c +++ b/src/file_txt.c @@ -423,6 +423,7 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff const char sign_jsp2[] = "<%="; const char sign_php[] = "filename,".html")!=NULL) || /* Text should not be found in JPEG */ (file_recovery->file_stat->file_hint==&file_hint_jpg && - td_memmem(buffer, buffer_size, "8BIM", 4)==NULL && - td_memmem(buffer, buffer_size, "adobe", 5)==NULL) || + td_memmem(buffer, buffer_size_test, "8BIM", 4)==NULL && + td_memmem(buffer, buffer_size_test, "adobe", 5)==NULL) || /* Text should not be found in zip because of compression */ - (file_recovery->file_stat->file_hint==&file_hint_zip && td_memmem(buffer, buffer_size, zip_header, 4)==NULL)) + (file_recovery->file_stat->file_hint==&file_hint_zip && + td_memmem(buffer, buffer_size_test, zip_header, 4)==NULL)) { reset_file_recovery(file_recovery_new); file_recovery_new->data_check=&data_check_txt;