summaryrefslogtreecommitdiffstats
path: root/src/file_txt.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-03-23 15:37:13 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-03-23 15:37:13 +0100
commit06bd7ec9e621af6ee959f0a0c3c8964b8e698146 (patch)
treefe37db95b4b5db2ec6277e477f451fd9eb1256e6 /src/file_txt.c
parenta2c3e19e589a291315e1aced47272a0a7024fd06 (diff)
PhotoRec: less false positive when .asp/.jsp detection
Diffstat (limited to 'src/file_txt.c')
-rw-r--r--src/file_txt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/file_txt.c b/src/file_txt.c
index 48358da..78dda6d 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, "<html")!=NULL)
ext="html";