]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Stop if the output file name is more than 255 characters instead of truncating the...
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Wed, 9 Sep 2009 05:26:32 +0000 (05:26 +0000)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Wed, 9 Sep 2009 05:26:32 +0000 (05:26 +0000)
report.c

index 1d0bf8e74c2ad4fe6103a3f65301bda8396dc829..b0696e217527073c8ef6fdab6733490a9981948d 100644 (file)
--- a/report.c
+++ b/report.c
@@ -220,9 +220,8 @@ void gerarel(void)
                   my_mkdir(arqtt);
                sprintf(arqtt,"%s/%s/tt%s-%s.html",dirname,accuser,accuser,siteind);
                if(strlen(arqtt) > 255) {
-                  strncpy(val7,arqtt,255);
-                  bzero(arqtt,MAXLEN);
-                  strcpy(arqtt,val7);
+                  fprintf(stderr, "SARG: (report) output file name too long: %s\n",arqtt);
+                  exit(1);
                }
                if ((fp_tt = fopen(arqtt, "w")) == 0) {
                   fprintf(stderr, "SARG: (report) %s: %s\n",text[45],arqtt);
@@ -230,11 +229,13 @@ void gerarel(void)
                }
                ttopen=1;
 
+               /*
                if(strcmp(Privacy,"yes") == 0)
                   sprintf(httplink,"<font size=%s color=%s><href=http://%s>%s",        \
                               FontSize,PrivacyStringColor,PrivacyString,PrivacyString);
                else
                   sprintf(httplink,"<font size=%s><a href=\"http://%s\">%s</a>",FontSize,accurl,accurl);
+               */
 
                sprintf(ltext110,"%s",text[110]);
                for(s=ltext110; *s; ++s)