aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/pop3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index 339d6e4ee..bace72a11 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -629,7 +629,8 @@ static CURLcode pop3_perform_authenticate(struct connectdata *conn)
if(mech && (pop3c->preftype & POP3_TYPE_SASL)) {
/* Perform SASL based authentication */
- if(initresp) {
+ if(initresp &&
+ 8 + strlen(mech) + len <= 255) { /* AUTH <mech> ...<crlf> */
result = Curl_pp_sendf(&pop3c->pp, "AUTH %s %s", mech, initresp);
if(!result)