From 52aeb065b18e29f31289ea409d0a1eb80441f814 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 9 Apr 2009 14:44:02 -0400 Subject: [PATCH] digest-md5: If client sent no input, log it as such instead of a more cryptic error. --HG-- branch : HEAD --- src/auth/mech-digest-md5.c | 5 +++++ 1 file changed, 5 insertions(+) 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)) { -- 2.47.3