]> err.no Git - systemd/commitdiff
util: fix handling of quotes in parse_env_file()
authorLennart Poettering <lennart@poettering.net>
Wed, 15 Sep 2010 23:57:59 +0000 (01:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 15 Sep 2010 23:57:59 +0000 (01:57 +0200)
src/util.c

index 47da11c1b8b0ce3633e352a8ce26be0ee081ec9b..c1ee936aaf97d7166d26bc9dcb863d5243f8abc2 100644 (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);