提交 1c2ac294 编写于 作者: J Jon Spillett

Fix potential null pointer dereference in ARIA implementation

Reviewed-by: NPaul Dale <paul.dale@oracle.com>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4286)
上级 198c42f5
......@@ -542,7 +542,7 @@ int aria_set_encrypt_key(const unsigned char *userKey, const int bits,
uint32_t w0[4], w1[4], w2[4], w3[4];
const uint32_t *ck;
ARIA_u128 *rk = key->rd_key;
ARIA_u128 *rk;
int Nr = (bits + 256) / 32;
if (userKey == NULL || key == NULL) {
......@@ -552,6 +552,7 @@ int aria_set_encrypt_key(const unsigned char *userKey, const int bits,
return -2;
}
rk = key->rd_key;
key->rounds = Nr;
ck = &Key_RC[(bits - 128) / 64][0];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册