diff -Nurd -x'*~' pkg-config-0.28.orig/pkg.c pkg-config-0.28/pkg.c --- pkg-config-0.28.orig/pkg.c 2013-01-22 08:11:59.000000000 -0500 +++ pkg-config-0.28/pkg.c 2014-06-23 03:30:57.000000000 -0400 @@ -176,7 +176,7 @@ if (ends_in_dotpc (dent->d_name)) { - char *pkgname = g_malloc (len - 2); + char *pkgname = g_malloc (len - EXT_LEN + 1); debug_spew ("File '%s' appears to be a .pc file\n", dent->d_name);