forked from ariadne/pkgconf
path: don't use PATH_MAX, use PKGCONF_ITEM_SIZE * 4 for realpath buffer
parent
a4e8cf87ad
commit
dbb6a232e5
|
@ -92,7 +92,7 @@ pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter)
|
||||||
return;
|
return;
|
||||||
if (S_ISLNK(st.st_mode))
|
if (S_ISLNK(st.st_mode))
|
||||||
{
|
{
|
||||||
char pathbuf[PATH_MAX];
|
char pathbuf[PKGCONF_ITEM_SIZE * 4];
|
||||||
char *linkdest = realpath(path, pathbuf);
|
char *linkdest = realpath(path, pathbuf);
|
||||||
|
|
||||||
if (linkdest != NULL && stat(linkdest, &st) == -1)
|
if (linkdest != NULL && stat(linkdest, &st) == -1)
|
||||||
|
|
Loading…
Reference in New Issue