Commit 21d596193d12ff0f1f00c59910a8b1bfd1887110

Authored by Silvan Calarco
1 parent 2bce284dd9
Exists in master

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

Showing 1 changed file with 7 additions and 5 deletions Side-by-side Diff

... ... @@ -1782,13 +1782,15 @@
1782 1782 return 0;
1783 1783 }
1784 1784  
  1785 +#define OBSOLETEBUF_SIZE 8096
  1786 +
1785 1787 int print_datatables(struct configTag *ct, int arch) {
1786 1788  
1787 1789 FILE *fbd,*fd,*fv,*fb,*fbsh,*fs,*fw;
1788 1790 char builddeps_filename[PATH_MAX], deps_filename[PATH_MAX], virtual_filename[PATH_MAX],
1789 1791 builds_filename[PATH_MAX], builds_sh_filename[PATH_MAX], sources_filename[PATH_MAX],
1790 1792 warnings_filename[PATH_MAX];
1791   - char obsoletebuf[PATH_MAX];
  1793 + char obsoletebuf[OBSOLETEBUF_SIZE];
1792 1794 struct headerList *currheaderlist, *currchild;
1793 1795 struct headerSourceList *currheadersourcelist, *oldheadersourcelist;
1794 1796 struct rebuildList *currrebuild;
1795 1797  
... ... @@ -2052,9 +2054,9 @@
2052 2054 if (currchild) {
2053 2055  
2054 2056 if (!strncmp(currheadersourcelist->arch, "noarch", PATH_MAX))
2055   - snprintf(obsoletebuf, PATH_MAX, "noarch");
  2057 + snprintf(obsoletebuf, OBSOLETEBUF_SIZE, "noarch");
2056 2058 else
2057   - snprintf(obsoletebuf, PATH_MAX, "%s", ct->arch[arch]);
  2059 + snprintf(obsoletebuf, OBSOLETEBUF_SIZE, "%s", ct->arch[arch]);
2058 2060 fprintf(fbsh,"[ \"$pkg\" = \"%s\" ] && { pkg_header=(%s %s %s %s \"%s\" \"%s\" %ld %ld %d %s); ",
2059 2061 currheadersourcelist->name,
2060 2062 currheadersourcelist->name,
2061 2063  
... ... @@ -2081,9 +2083,9 @@
2081 2083 }
2082 2084 for (i = 0; i < currchild->obsoletecount; i++ ) {
2083 2085 if ((i > 0) && (!strcmp(currchild->obsoletename[i],currchild->obsoletename[i-1]))) continue;
2084   - if (strlen(obsoletebuf) + strlen(currchild->obsoletename[i]) >= PATH_MAX - 2) {
  2086 + if (strlen(obsoletebuf) + strlen(currchild->obsoletename[i]) >= OBSOLETEBUF_SIZE - 2) {
2085 2087 logmsg(LOG_WARNING, "%s: reached obsoletebuf maximum size (%d); skipping further obsoletes in output file",
2086   - currheadersourcelist->name, PATH_MAX);
  2088 + currheadersourcelist->name, OBSOLETEBUF_SIZE);
2087 2089 break;
2088 2090 }
2089 2091 if (obsoletebuf[0] != '\0') strncat(obsoletebuf, " ", sizeof(obsoletebuf) - strlen(obsoletebuf));