]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Remove the test on the string length for the date elements processed as integers...
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 8 Jun 2010 18:45:18 +0000 (18:45 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Tue, 8 Jun 2010 18:45:18 +0000 (18:45 +0000)
squidguard_log.c

index f74e34dafeeb3badfc0720fd4ce9bd92fb71caed..fbf80ff5227743cb52f5435aa377fe32dd8ac242 100644 (file)
@@ -116,30 +116,17 @@ static void read_log(const char *wentp, FILE *fp_ou,int dfrom,int duntil)
                   exit(EXIT_FAILURE);
                }
                if(strcmp(leks,"year") == 0) {
-                  if (strlen(res)>=sizeof(year)) {
-                     debuga(_("Year string too long in redirector log file %s\n"),wentp);
-                     exit(EXIT_FAILURE);
-                  }
                   year=atoi(res);
                } else if(strcmp(leks,"mon") == 0) {
-                  if (strlen(res)>=sizeof(mon)) {
-                     debuga(_("Month string too long in redirector log file %s\n"),wentp);
-                     exit(EXIT_FAILURE);
-                  }
                   mon=atoi(res);
                } else if(strcmp(leks,"day") == 0) {
-                  if (strlen(res)>=sizeof(day)) {
-                     debuga(_("Day string too long in redirector log file %s\n"),wentp);
-                     exit(EXIT_FAILURE);
-                  }
                   day=atoi(res);
                } else if(strcmp(leks,"hour") == 0) {
                   if (strlen(res)>=sizeof(hour)) {
                      debuga(_("Hour string too long in redirector log file %s\n"),wentp);
                      exit(EXIT_FAILURE);
                   }
-                  strncpy(hour,res,sizeof(hour)-1);
-                  hour[sizeof(hour)-1]='\0';
+                  strcpy(hour,res);
                } else if(strcmp(leks,"list") == 0) {
                   if (strlen(res)>=sizeof(list)) {
                      debuga(_("Banning list name too long in redirector log file %s\n"),wentp);