Fix nr_derive_key memory problem.

This commit is contained in:
Masayuki Harada
2021-09-29 00:10:48 +09:00
parent 2fb3816722
commit 80831cd48f
7 changed files with 18 additions and 136 deletions
+2
View File
@@ -121,6 +121,8 @@ int nr_derive_key(algorithm_type_dist_t alg_type, uint8_t alg_id,
string[6] = 0x01;
kdf(string, 7, key, 32, out, 32);
// in NR, we use the last 16 bytes, ignoring the first 16 ones
memcpy(*out, *out+16, 16);
return 0;
}