From: Timo Sirainen Date: Thu, 9 Apr 2009 18:44:02 +0000 (-0400) Subject: digest-md5: If client sent no input, log it as such instead of a more cryptic error. X-Git-Tag: 2.0.alpha1~1004 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=52aeb065b18e29f31289ea409d0a1eb80441f814;p=thirdparty%2Fdovecot%2Fcore.git digest-md5: If client sent no input, log it as such instead of a more cryptic error. --HG-- branch : HEAD --- diff --git a/src/auth/mech-digest-md5.c b/src/auth/mech-digest-md5.c index 2e86d73c9e..4856561f68 100644 --- a/src/auth/mech-digest-md5.c +++ b/src/auth/mech-digest-md5.c @@ -472,6 +472,11 @@ static bool parse_digest_response(struct digest_auth_request *request, *error = NULL; failed = FALSE; + if (size == 0) { + *error = "Client sent no input"; + return FALSE; + } + copy = t_strdup_noconst(t_strndup(data, size)); while (*copy != '\0') { if (parse_next(©, &key, &value)) {