Skip to content

Resolve "GCC 12 static analyzer: error: dereference of NULL 'alginfo' in openssleddsa_link.c"

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;
      |             ^~~~~~~~~

Closes #3993 (closed)

Merge request reports