util: fix handling of quotes in parse_env_file()

This commit is contained in:
Lennart Poettering 2010-09-16 01:57:59 +02:00
parent 72bca11ba2
commit e7db37dd19
1 changed files with 2 additions and 2 deletions

View File

@ -641,8 +641,8 @@ int parse_env_file(
n = strcspn(p, seperator);
if (n >= 2 &&
strchr(QUOTES, v[0]) &&
v[n-1] == v[0])
strchr(QUOTES, p[0]) &&
p[n-1] == p[0])
v = strndup(p+1, n-2);
else
v = strndup(p, n);