mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
INSIST that openssleddsa_alg_info() is successful
In the check_algorithm() function openssleddsa_alg_info() is called with two known variants of the 'algorithm' argument, and both are expected to return a non-NULL value. Add an INSIST to suppress the following GCC 12 analyzer report: openssleddsa_link.c: In function 'raw_key_to_ossl': openssleddsa_link.c:92:13: error: dereference of NULL 'alginfo' [CWE-476] [-Werror=analyzer-null-dereference] 92 | int pkey_type = alginfo->pkey_type; | ^~~~~~~~~
This commit is contained in:
committed by
Arаm Sаrgsyаn
parent
4d1a80aea1
commit
48c506c274
@@ -633,6 +633,7 @@ check_algorithm(unsigned char algorithm) {
|
||||
DST_RET(ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
INSIST(alginfo != NULL);
|
||||
ret = raw_key_to_ossl(alginfo, 0, key, &key_len, &pkey);
|
||||
if (ret != ISC_R_SUCCESS) {
|
||||
goto err;
|
||||
|
Reference in New Issue
Block a user