提交 d73ca3ef 编写于 作者: M Matt Caswell

Remove an NULL ptr deref in an error path

The |passwd| variable in the code can be NULL if it goes to the err label.
Therefore we cannot call strlen on it without first checking that it is non
NULL.
Reviewed-by: NKurt Roeckx <kurt@openssl.org>
上级 e4693b4e
......@@ -393,7 +393,8 @@ int srp_generate_client_master_secret(SSL *s)
err:
BN_clear_free(K);
BN_clear_free(x);
OPENSSL_clear_free(passwd, strlen(passwd));
if (passwd != NULL)
OPENSSL_clear_free(passwd, strlen(passwd));
BN_clear_free(u);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册