aboutsummaryrefslogtreecommitdiff
path: root/libpkgconf/tuple.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpkgconf/tuple.c')
-rw-r--r--libpkgconf/tuple.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpkgconf/tuple.c b/libpkgconf/tuple.c
index ae5fe55..7fbc71b 100644
--- a/libpkgconf/tuple.c
+++ b/libpkgconf/tuple.c
@@ -231,7 +231,7 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
*bptr++ = *ptr;
else if (*(ptr + 1) == '{')
{
- char varname[PKGCONF_SBUFSIZE];
+ char varname[PKGCONF_ITEM_SIZE];
char *vptr = varname;
const char *pptr;
char *kv, *parsekv;
@@ -292,10 +292,11 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
*/
if (*buf == '/' &&
client->sysroot_dir != NULL &&
+ strcmp(client->sysroot_dir, "/") != 0 &&
strlen(buf) > strlen(client->sysroot_dir) &&
strstr(buf + strlen(client->sysroot_dir), client->sysroot_dir) != NULL)
{
- char cleanpath[PKGCONF_SBUFSIZE];
+ char cleanpath[PKGCONF_ITEM_SIZE];
pkgconf_strlcpy(cleanpath, buf + strlen(client->sysroot_dir), sizeof cleanpath);
pkgconf_path_relocate(cleanpath, sizeof cleanpath);