From: Frédéric Marchal Date: Thu, 28 Jul 2011 13:07:03 +0000 (+0000) Subject: Replace tabs by spaces in the URL and the code X-Git-Tag: v2.3.2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f27d281dcccf658b7eecb3006cca8d7c1b664e37;p=thirdparty%2Fsarg.git Replace tabs by spaces in the URL and the code Any tab encountered in a field of the input log file will send sarg off track as it uses a tab to delimit columns in its temporary files. To prevent this problem, the URL and the HTML code found in the input log file are processed to replace any tab character by a single space. --- diff --git a/log.c b/log.c index bfa26c6..8b353da 100644 --- a/log.c +++ b/log.c @@ -1322,6 +1322,11 @@ int main(int argc,char *argv[]) for (x=3 ; str[x] ; x++) str[x-2]=str[x]; } #endif + // replace any tab by a single space + for (str=full_url ; *str ; str++) + if (*str=='\t') *str=' '; + for (str=code ; *str ; str++) + if (*str=='\t') *str=' '; urly=full_url;