1.60b: Minor sniffer fix to better handle CSV file checks

This commit is contained in:
Steve Pinkham 2010-08-27 11:47:18 -04:00
parent 512dfe7ea6
commit 5e85684e40
3 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Version 1.60b:
--------------
- Minor sniffer fix to better handle CSV file checks.
Version 1.59b:
--------------

View File

@ -20,7 +20,7 @@
#
PROGNAME = skipfish
VERSION = 1.59b
VERSION = 1.60b
OBJFILES = http_client.c database.c crawler.c analysis.c report.c
INCFILES = alloc-inl.h string-inl.h debug.h types.h http_client.h \

View File

@ -2462,11 +2462,13 @@ static void check_for_stuff(struct http_request* req,
if (res->sniff_mime_id == MIME_ASC_GENERIC) {
u8* cur = res->payload;
u8 all_delim = 0;
u8* eol;
do {
u8 *eol = (u8*)strchr((char*)cur, '\n');
u32 del = strcspn((char*)cur, ",|;\n");
eol = (u8*)strchr((char*)cur, '\n');
if (!cur[del] || cur[del] == '\n') {
all_delim = 0;
break;
@ -2475,7 +2477,7 @@ static void check_for_stuff(struct http_request* req,
all_delim = 1;
cur = eol + 1;
} while (cur && *cur);
} while (eol && cur && *cur);
if (all_delim) {
problem(PROB_FILE_POI, req, res,