Package: sarg
Version: 2.2.5-2
Severity: important
Tags: patch

On squid-generated data, sarg fails with the message. This started only a few 
weeks ago.

 /etc/cron.daily/sarg:
 SARG: getword loop detected.
 SARG: searching for 'x2c'
 SARG: Maybe you have a broken record or garbage in your access.log file.
 
Running with some debugging output, I found that this problem is triggered from
util.c:339, in void name_month(char *month). The last call of getword from this
function passes sizeof(month) as string length argument, but sizeof(char*) is 
always
4, since it is a pointer. Instead, it should be strlen(m), which is the string 
from
which the month name is to be taken.

Patch below, I ask someone for a quick review.

Regards, Václav Šmilauer

--- orig/sarg-2.2.5/util.c      2009-04-02 13:40:14.000000000 +0200
+++ new/sarg-2.2.5/util.c       2009-04-02 13:45:39.000000000 +0200
@@ -336,7 +336,7 @@
 
    for(x=0; x<z; x++)
       getword(w,sizeof(w),m,',');
-   getword(month,sizeof(month),m,',');
+   getword(month,strlen(m),m,',');
 }
 



-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages sarg depends on:
ii  libc6                  2.7-18            GNU C Library: Shared libraries
ii  libgd2-xpm             2.0.36~rc1~dfsg-3 GD Graphics Library version 2

sarg recommends no packages.

Versions of packages sarg suggests:
ii  apache2                  2.2.9-10+lenny2 Apache HTTP Server metapackage
ii  apache2-mpm-prefork [htt 2.2.9-10+lenny2 Apache HTTP Server - traditional n
ii  libapache2-mod-php5      5.2.6.dfsg.1-3  server-side, HTML-embedded scripti
ii  squid                    2.7.STABLE3-4.1 Internet object cache (WWW proxy c
pn  squidguard               <none>          (no description available)

-- no debconf information



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to