]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
setting_parse_environ(): Don't crash if environ=NULL.
authorTimo Sirainen <tss@iki.fi>
Fri, 14 Aug 2009 18:18:15 +0000 (14:18 -0400)
committerTimo Sirainen <tss@iki.fi>
Fri, 14 Aug 2009 18:18:15 +0000 (14:18 -0400)
--HG--
branch : HEAD

src/lib-settings/settings-parser.c

index 0c9be5eb63717898a40a5e9d917821b16d39aed8..d66b1a8e2e92fe5e21900b435934f6d6c7056d8b 100644 (file)
@@ -569,6 +569,9 @@ int settings_parse_environ(struct setting_parser_context *ctx)
        unsigned int i, count;
        int ret = 0;
 
+       if (environ == NULL)
+               return 0;
+
        /* sort the settings first. this is necessary for putenv()
           implementations (e.g. valgrind) which change the order of strings
           in environ[] */