From 06bd7ec9e621af6ee959f0a0c3c8964b8e698146 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 23 Mar 2013 15:37:13 +0100 Subject: [PATCH] PhotoRec: less false positive when .asp/.jsp detection --- src/file_txt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/file_txt.c b/src/file_txt.c index 48358da2..78dda6d9 100644 --- a/src/file_txt.c +++ b/src/file_txt.c @@ -984,11 +984,11 @@ static int header_check_txt(const unsigned char *buffer, const unsigned int buff ext="tex"; else if(strstr(buffer_lower, "#include")!=NULL) ext="c"; - else if(strstr(buffer_lower, "<%@")!=NULL) + else if(l>20 && strstr(buffer_lower, "<%@")!=NULL) ext="jsp"; - else if(strstr(buffer_lower, "<%=")!=NULL) + else if(l>20 && strstr(buffer_lower, "<%=")!=NULL) ext="jsp"; - else if(strstr(buffer_lower, "<% ")!=NULL) + else if(l>20 && strstr(buffer_lower, "<% ")!=NULL) ext="asp"; else if(strstr(buffer_lower, "