diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 34981e94ac3a..db257883c9fa 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -381,7 +381,7 @@ _fetch_add_entry(struct url_ent **p, int *size, int *len, } tmp = *p + *len; - snprintf(tmp->name, MAXPATHLEN, "%s", name); + snprintf(tmp->name, PATH_MAX, "%s", name); bcopy(stat, &tmp->stat, sizeof *stat); (*len)++; diff --git a/lib/libfetch/file.c b/lib/libfetch/file.c index 2db091db3f25..4e2ddc7e3141 100644 --- a/lib/libfetch/file.c +++ b/lib/libfetch/file.c @@ -117,7 +117,7 @@ fetchListFile(struct url *u, const char *flags) struct url_stat us; struct url_ent *ue; int size, len; - char fn[MAXPATHLEN], *p; + char fn[PATH_MAX], *p; int l; if ((dir = opendir(u->doc)) == NULL) {