--- pkg-config-0.21-orig/parse.c 2006-08-16 20:45:45.000000000 +0200 +++ pkg-config-0.21-joty/parse.c 2006-09-08 00:50:07.000000000 +0200 @@ -139,9 +139,21 @@ trim_string (const char *str) { int len; + int quote; g_return_val_if_fail (str != NULL, NULL); - + + while (*str && isspace ((guchar)*str)) + str++; + + if (*str == '"') + { + ++str; + quote = 1; + } + else + quote = 0; + while (*str && isspace ((guchar)*str)) str++; @@ -149,6 +161,22 @@ while (len > 0 && isspace ((guchar)str[len-1])) len--; + if (quote) + { + if (len > 0 && str[len - 1] == '"') + --len; + else + { + verbose_error ("Wrongly quoted string '%s'\n", + str); + + exit (1); + } + } + + while (len > 0 && isspace ((guchar)str[len-1])) + len--; + return g_strndup (str, len); }