reports: implement a basic check on duplicates in obsoletebuf

This commit is contained in:
Silvan Calarco 2013-01-02 00:27:48 +01:00
parent 971f2764e9
commit 27b05fffa1

View File

@ -2069,8 +2069,10 @@ print_datatables(struct configTag *ct, int arch) {
fprintf(fbsh,"%s",currchild->name);
fprintf(fb," %s",currchild->name);
for (i = 0; i < currchild->obsoletecount; i++ ) {
if ((i > 0) && (!strcmp(currchild->obsoletename[i],currchild->obsoletename[i-1]))) break;
if (strlen(obsoletebuf) + strlen(currchild->obsoletename[i]) >= PATH_MAX - 2) {
logmsg(LOG_WARNING, "reached obsoletebuf maximum size (%d); skipping further obsoletes", PATH_MAX);
logmsg(LOG_WARNING, "%s: reached obsoletebuf maximum size (%d); skipping further obsoletes in output file",
currheadersourcelist->name, PATH_MAX);
break;
}
if (obsoletebuf[0] != '\0') strcat(obsoletebuf," ");