summaryrefslogtreecommitdiffstats
path: root/crypto/modes/asm/aes-gcm-ppc.pl
diff options
context:
space:
mode:
authorJiasheng Jiang <jiasheng@iscas.ac.cn>2022-02-02 19:45:59 +0800
committerPauli <pauli@openssl.org>2022-02-07 11:24:40 +1100
commitb2f90e93a07d992515782511a5770aa7cf7dc28f (patch)
treebe75ea51ac9fd50c69e0c0b9415c33232c1ede49 /crypto/modes/asm/aes-gcm-ppc.pl
parent07c5465e9855cc485c4a84da8a4251a843bec258 (diff)
evp_test: Add the missing check after calling OPENSSL_strdup and sk_OPENSSL_STRING_new_null
Since the memory allocation may fail, the 'mac_name' and 'controls' could be NULL. And the 'mac_name' will be printed in mac_test_run_mac() without check. Also the result of 'params_n + sk_OPENSSL_STRING_num(expected->controls)' in mac_test_run_mac() will be 'params_n - 1' if allocation fails , which does not make sense. Therefore, it should be better to check them in order to guarantee the complete success of initiation. If fails, we also need to free the 'mdat' to avoid the memory leak. Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17628)
Diffstat (limited to 'crypto/modes/asm/aes-gcm-ppc.pl')
0 files changed, 0 insertions, 0 deletions