diff --git a/src/distromatic.c b/src/distromatic.c index d565f67..c6973a8 100644 --- a/src/distromatic.c +++ b/src/distromatic.c @@ -244,16 +244,16 @@ handleObsoletedPackages(struct configTag *ct, int archidx) { struct providedList *prov = ct->providedlist_idx[archidx][0]; int i,j,k; - int obs[256]; + int obs[OBSOLETE_MAX]; char buf[PATH_MAX]; struct headerList *currheader; - + while (prov) { - - if (prov->numproviders > 256) { + + if (prov->numproviders > OBSOLETE_MAX) { return 1; } - + if (prov->numproviders > 1) { for (i = 0; i < prov->numproviders; i++) obs[i]=-1; for (i = 0; i < prov->numproviders; i++) diff --git a/src/include/distromatic.h b/src/include/distromatic.h index e27e220..ce19b8d 100644 --- a/src/include/distromatic.h +++ b/src/include/distromatic.h @@ -11,6 +11,8 @@ #include "globaldefs.h" #include "headerlist.h" +#define OBSOLETE_MAX 1024 + struct configDefaults { char *html_basedir; char *distribution_name;