Hi Paolo,

We have a large nfacctd.conf file around 530 lines. When we try to
start nfacctd with the -F flag we get a segfault at line below.

      /* splitting key, value and name */
      delim = strchr(cfg[index], ':');
      *delim = '\0';                           <<<<<<<<<
      key = cfg[index];
      value = delim+1;


I changed the code like below to avoid the segfault - note this happens on the
last line of the file.
Also we only get the segfault if we use the -F flag.

      delim = strchr(cfg[index], ':');
      if (delim) {
          *delim = '\0';
          key = cfg[index];
          value = delim+1;
      } else {
          index++;
          continue;
      }

Regards,
Steve


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to