reports.c: increase size of obsoletebuf from 4096 to 8192

This commit is contained in:
Silvan Calarco 2020-10-01 11:39:53 +02:00
parent 2bce284dd9
commit 21d596193d

View File

@ -1782,13 +1782,15 @@ int print_contentslist(struct configTag *ct, int arch) {
return 0;
}
#define OBSOLETEBUF_SIZE 8096
int print_datatables(struct configTag *ct, int arch) {
FILE *fbd,*fd,*fv,*fb,*fbsh,*fs,*fw;
char builddeps_filename[PATH_MAX], deps_filename[PATH_MAX], virtual_filename[PATH_MAX],
builds_filename[PATH_MAX], builds_sh_filename[PATH_MAX], sources_filename[PATH_MAX],
warnings_filename[PATH_MAX];
char obsoletebuf[PATH_MAX];
char obsoletebuf[OBSOLETEBUF_SIZE];
struct headerList *currheaderlist, *currchild;
struct headerSourceList *currheadersourcelist, *oldheadersourcelist;
struct rebuildList *currrebuild;
@ -2052,9 +2054,9 @@ int print_datatables(struct configTag *ct, int arch) {
if (currchild) {
if (!strncmp(currheadersourcelist->arch, "noarch", PATH_MAX))
snprintf(obsoletebuf, PATH_MAX, "noarch");
snprintf(obsoletebuf, OBSOLETEBUF_SIZE, "noarch");
else
snprintf(obsoletebuf, PATH_MAX, "%s", ct->arch[arch]);
snprintf(obsoletebuf, OBSOLETEBUF_SIZE, "%s", ct->arch[arch]);
fprintf(fbsh,"[ \"$pkg\" = \"%s\" ] && { pkg_header=(%s %s %s %s \"%s\" \"%s\" %ld %ld %d %s); ",
currheadersourcelist->name,
currheadersourcelist->name,
@ -2081,9 +2083,9 @@ int print_datatables(struct configTag *ct, int arch) {
}
for (i = 0; i < currchild->obsoletecount; i++ ) {
if ((i > 0) && (!strcmp(currchild->obsoletename[i],currchild->obsoletename[i-1]))) continue;
if (strlen(obsoletebuf) + strlen(currchild->obsoletename[i]) >= PATH_MAX - 2) {
if (strlen(obsoletebuf) + strlen(currchild->obsoletename[i]) >= OBSOLETEBUF_SIZE - 2) {
logmsg(LOG_WARNING, "%s: reached obsoletebuf maximum size (%d); skipping further obsoletes in output file",
currheadersourcelist->name, PATH_MAX);
currheadersourcelist->name, OBSOLETEBUF_SIZE);
break;
}
if (obsoletebuf[0] != '\0') strncat(obsoletebuf, " ", sizeof(obsoletebuf) - strlen(obsoletebuf));