Skip to content

Commit 1c2ac29

Browse files
committed
Fix potential null pointer dereference in ARIA implementation
Reviewed-by: Paul Dale <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from openssl#4286)
1 parent 198c42f commit 1c2ac29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crypto/aria/aria.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ int aria_set_encrypt_key(const unsigned char *userKey, const int bits,
542542
uint32_t w0[4], w1[4], w2[4], w3[4];
543543
const uint32_t *ck;
544544

545-
ARIA_u128 *rk = key->rd_key;
545+
ARIA_u128 *rk;
546546
int Nr = (bits + 256) / 32;
547547

548548
if (userKey == NULL || key == NULL) {
@@ -552,6 +552,7 @@ int aria_set_encrypt_key(const unsigned char *userKey, const int bits,
552552
return -2;
553553
}
554554

555+
rk = key->rd_key;
555556
key->rounds = Nr;
556557
ck = &Key_RC[(bits - 128) / 64][0];
557558

0 commit comments

Comments
 (0)