Submitted by: Peter Sylvester <peter.sylvester@edelweb.fr>

Fix srp extension.
This commit is contained in:
Dr. Stephen Henson
2012-02-10 20:08:36 +00:00
parent 3770b988c0
commit 1df80b6561
2 changed files with 35 additions and 19 deletions

View File

@@ -3609,7 +3609,7 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
ctx->srp_ctx.login = NULL;
if (parg == NULL)
break;
if (strlen((char *)parg) > 254)
if (strlen((const char *)parg) > 255 || strlen((const char *)parg) < 1)
{
SSLerr(SSL_F_SSL3_CTX_CTRL, SSL_R_INVALID_SRP_USERNAME);
return 0;