提交 19f7130b 编写于 作者: D Dmitry-Me 提交者: Rich Salz

GH608: Ensure 64-bit shift no matter sizeof(long)

Signed-off-by: NRich Salz <rsalz@openssl.org>
Reviewed-by: NEmilia Käsper <emilia@openssl.org>
上级 542dfaf3
...@@ -228,7 +228,7 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen, ...@@ -228,7 +228,7 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen,
*/ */
if (16 * r <= LOG2_UINT64_MAX) { if (16 * r <= LOG2_UINT64_MAX) {
if (N >= (1UL << (16 * r))) if (N >= (((uint64_t)1) << (16 * r)))
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册