chiark / gitweb /
basic/env-util: when serializing, actually use escaping
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 24 Jun 2017 00:27:12 +0000 (20:27 -0400)
committerSven Eden <yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:46:53 +0000 (09:46 +0200)
Fixes #6152.

src/basic/env-util.c

index 5515fd7353b7c0534179fa11e367dcc0a7c991bd..47c1fccd3b07eaabd65bdd02096168bbb7bf4307 100644 (file)
@@ -780,7 +780,7 @@ int serialize_environment(FILE *f, char **environment) {
                 if (!ce)
                         return -ENOMEM;
 
                 if (!ce)
                         return -ENOMEM;
 
-                fprintf(f, "env=%s\n", *e);
+                fprintf(f, "env=%s\n", ce);
         }
 
         /* caller should call ferror() */
         }
 
         /* caller should call ferror() */