summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2019-08-21 15:40:43 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2019-08-21 15:40:43 +0200
commit65eea944b628e817fb952620e16634da400ddb48 (patch)
treea92bea2fd0580b4f7046033e9a0a748712cc975f /src
parent54c7b91372de6687a31e596ffb1a74ae41ab419e (diff)
PhotoRec: fix commit 94fa96ce3f72d03dd4e113eadc2043872bc07664
Diffstat (limited to 'src')
-rw-r--r--src/file_txt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/file_txt.c b/src/file_txt.c
index 8cdde56..19ea286 100644
--- a/src/file_txt.c
+++ b/src/file_txt.c
@@ -33,6 +33,7 @@
#include <time.h>
#endif
#include <ctype.h> /* tolower */
+#include <assert.h>
#include <stdio.h>
#include "types.h"
#include "common.h"
@@ -119,10 +120,10 @@ static const txt_header_t fasttxt_headers[] = {
{ "#! /bin/ksh", 11, "sh"},
{ "#! /bin/sh", 10, "sh"},
{ "#!/usr/bin/env groovy", 21, "groovy"},
- { "#!/usr/bin/env perl", 21, "pl"},
- { "#!/usr/bin/env php", 19, "php"},
+ { "#!/usr/bin/env perl", 19, "pl"},
+ { "#!/usr/bin/env php", 18, "php"},
{ "#!/usr/bin/env python", 21, "py"},
- { "#!/usr/bin/env ruby", 20, "rb"},
+ { "#!/usr/bin/env ruby", 19, "rb"},
/* Opera Hotlist bookmark/contact list/notes */
{ "Opera Hotlist version 2.0", 25, "adr"},
/* Microsoft VB Class module */
@@ -1514,6 +1515,7 @@ static void register_header_check_fasttxt(file_stat_t *file_stat)
const txt_header_t *header=&fasttxt_headers[0];
while(header->len > 0)
{
+ assert(strlen(header->string) == header->len);
register_header_check(0, header->string, header->len, &header_check_fasttxt, file_stat);
header++;
}