diff --git a/lib/smtp.c b/lib/smtp.c index 3e8441953944c8439c69ee7f8026131fc79011b8..72b3bbf6ac61fb8e94fe03d2d4d26aba9bf01835 100644 --- a/lib/smtp.c +++ b/lib/smtp.c @@ -527,7 +527,7 @@ static CURLcode smtp_perform_authenticate(struct connectdata *conn) if(!result) { /* Perform SASL based authentication */ if(initresp && - strlen(mech) + len <= 512 - 8) { /* AUTH ... */ + 8 + strlen(mech) + len <= 512) { /* AUTH ... */ result = Curl_pp_sendf(&smtpc->pp, "AUTH %s %s", mech, initresp); if(!result)