From: Stephan Bosch Date: Tue, 18 Aug 2015 17:39:24 +0000 (+0300) Subject: lib-http auth: Fixed segfault occurring in http_auth_challenge_copy() when there... X-Git-Tag: 2.2.19.rc1~241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77f3d7fc65d4335e85faf088f056d462df17ffd5;p=thirdparty%2Fdovecot%2Fcore.git lib-http auth: Fixed segfault occurring in http_auth_challenge_copy() when there are no parameters. --- diff --git a/src/lib-http/http-auth.c b/src/lib-http/http-auth.c index 690b64e950..9804491e22 100644 --- a/src/lib-http/http-auth.c +++ b/src/lib-http/http-auth.c @@ -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;