crypto/modes/siv128.c:177: error: NULL_DEREFERENCE
  pointer `cbc_name` last assigned on line 173 could be null and is dereferenced by call to `strlen()` at line 177, column 50.
Showing all 10 steps of the trace


crypto/modes/siv128.c:166:1: start of procedure CRYPTO_siv128_init()
164.    * Initialise an existing SIV128_CONTEXT
165.    */
166. > int CRYPTO_siv128_init(SIV128_CONTEXT *ctx, const unsigned char *key, int klen,
167.                          const EVP_CIPHER* cbc, const EVP_CIPHER* ctr)
168.   {

crypto/modes/siv128.c:169:5: 
167.                          const EVP_CIPHER* cbc, const EVP_CIPHER* ctr)
168.   {
169. >     static const unsigned char zero[SIV_LEN] = { 0 };
170.       size_t out_len = SIV_LEN;
171.       EVP_MAC_CTX *mac_ctx = NULL;

crypto/modes/siv128.c:170:5: 
168.   {
169.       static const unsigned char zero[SIV_LEN] = { 0 };
170. >     size_t out_len = SIV_LEN;
171.       EVP_MAC_CTX *mac_ctx = NULL;
172.       OSSL_PARAM params[3];

crypto/modes/siv128.c:171:5: 
169.       static const unsigned char zero[SIV_LEN] = { 0 };
170.       size_t out_len = SIV_LEN;
171. >     EVP_MAC_CTX *mac_ctx = NULL;
172.       OSSL_PARAM params[3];
173.       const char *cbc_name = EVP_CIPHER_name(cbc);

crypto/modes/siv128.c:173:5: 
171.       EVP_MAC_CTX *mac_ctx = NULL;
172.       OSSL_PARAM params[3];
173. >     const char *cbc_name = EVP_CIPHER_name(cbc);
174.   
175.       params[0] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_CIPHER,

crypto/evp/evp_lib.c:433:1: start of procedure EVP_CIPHER_name()
  431.   }
  432.   
  433. > const char *EVP_CIPHER_name(const EVP_CIPHER *cipher)
  434.   {
  435.       if (cipher->prov != NULL)

crypto/evp/evp_lib.c:435:9: Taking false branch
  433.   const char *EVP_CIPHER_name(const EVP_CIPHER *cipher)
  434.   {
  435.       if (cipher->prov != NULL)
                 ^
  436.           return cipher->name;
  437.   #ifndef FIPS_MODE

crypto/evp/evp_lib.c:440:5: 
  438.       return OBJ_nid2sn(EVP_CIPHER_nid(cipher));
  439.   #else
  440. >     return NULL;
  441.   #endif
  442.   }

crypto/evp/evp_lib.c:442:1: return from a call to EVP_CIPHER_name
  440.       return NULL;
  441.   #endif
  442. > }
  443.   
  444.   const OSSL_PROVIDER *EVP_CIPHER_provider(const EVP_CIPHER *cipher)

crypto/modes/siv128.c:175:5: 
173.       const char *cbc_name = EVP_CIPHER_name(cbc);
174.   
175. >     params[0] = OSSL_PARAM_construct_utf8_string(OSSL_MAC_PARAM_CIPHER,
176.                                                    (char *)cbc_name,
177.                                                    strlen(cbc_name) + 1);
