diff options
Diffstat (limited to 'lib/vauth')
-rw-r--r-- | lib/vauth/cleartext.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vauth/cleartext.c b/lib/vauth/cleartext.c index 6f452c169..001f6ea9a 100644 --- a/lib/vauth/cleartext.c +++ b/lib/vauth/cleartext.c @@ -81,7 +81,8 @@ CURLcode Curl_auth_create_plain_message(struct Curl_easy *data, plen = strlen(passwd); /* Compute binary message length. Check for overflows. */ - if(((zlen + clen) > SIZE_T_MAX/4) || (plen > (SIZE_T_MAX/2 - 2))) + if((zlen > SIZE_T_MAX/4) || (clen > SIZE_T_MAX/4) || + (plen > (SIZE_T_MAX/2 - 2))) return CURLE_OUT_OF_MEMORY; plainlen = zlen + clen + plen + 2; |