From 7f6a185977465bc0ec6806eff6e5c8d81ed3b1dc Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 13 Jan 2017 19:55:54 -0600 Subject: [PATCH] fragment: only munge if sysroot_dir is actually set on cygwin/msys2, it is possible for munging to be enabled for other types of munging (instead of sysroot) --- libpkgconf/fragment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpkgconf/fragment.c b/libpkgconf/fragment.c index 6a64508..0528b53 100644 --- a/libpkgconf/fragment.c +++ b/libpkgconf/fragment.c @@ -95,7 +95,7 @@ pkgconf_fragment_munge(const pkgconf_client_t *client, char *buf, size_t buflen, if (sysroot_dir == NULL) sysroot_dir = pkgconf_tuple_find_global(client, "pc_sysrootdir"); - if (pkgconf_fragment_should_munge(source, sysroot_dir)) + if (sysroot_dir != NULL && pkgconf_fragment_should_munge(source, sysroot_dir)) pkgconf_strlcat(buf, sysroot_dir, buflen); pkgconf_strlcat(buf, source, buflen);