From dbb6a232e51bebf25e27dc8cfb0efed4cebd7b75 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Thu, 18 Mar 2021 06:56:55 -0600 Subject: [PATCH] path: don't use PATH_MAX, use PKGCONF_ITEM_SIZE * 4 for realpath buffer --- libpkgconf/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpkgconf/path.c b/libpkgconf/path.c index 796bf81..8e23c44 100644 --- a/libpkgconf/path.c +++ b/libpkgconf/path.c @@ -92,7 +92,7 @@ pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter) return; if (S_ISLNK(st.st_mode)) { - char pathbuf[PATH_MAX]; + char pathbuf[PKGCONF_ITEM_SIZE * 4]; char *linkdest = realpath(path, pathbuf); if (linkdest != NULL && stat(linkdest, &st) == -1)