]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http auth: Fixed segfault occurring in http_auth_challenge_copy() when there...
authorStephan Bosch <stephan@rename-it.nl>
Tue, 18 Aug 2015 17:39:24 +0000 (20:39 +0300)
committerStephan Bosch <stephan@rename-it.nl>
Tue, 18 Aug 2015 17:39:24 +0000 (20:39 +0300)
src/lib-http/http-auth.c

index 690b64e95045725e725d3d5b92d261ee86162622..9804491e224c0e5240dea37aa6e1b0e84661c761 100644 (file)
@@ -370,6 +370,9 @@ http_auth_params_clone(pool_t pool,
 {
        const struct http_auth_param *sparam;
 
+       if (!array_is_created(src))
+               return;
+
        p_array_init(dst, pool, 4);
        array_foreach(src, sparam) {
                struct http_auth_param nparam;