crypto/evp/evp_pbe.c:162: error: NULL_DEREFERENCE
  pointer `pbe_algs` last assigned on line 153 could be null and is dereferenced by call to `sk_push()` at line 162, column 2.
Showing all 16 steps of the trace


crypto/evp/evp_pbe.c:149:1: start of procedure EVP_PBE_alg_add()
147.   /* Add a PBE algorithm */
148.   
149. > int EVP_PBE_alg_add (int nid, EVP_CIPHER *cipher, EVP_MD *md,
150.   	     EVP_PBE_KEYGEN *keygen)
151.   {

crypto/evp/evp_pbe.c:153:7: Taking true branch
151.   {
152.   	EVP_PBE_CTL *pbe_tmp;
153.   	if (!pbe_algs) pbe_algs = sk_new (pbe_cmp);
             ^
154.   	if (!(pbe_tmp = (EVP_PBE_CTL*) Malloc (sizeof(EVP_PBE_CTL)))) {
155.   		EVPerr(EVP_F_EVP_PBE_ALG_ADD,ERR_R_MALLOC_FAILURE);

crypto/evp/evp_pbe.c:153:17: 
151.   {
152.   	EVP_PBE_CTL *pbe_tmp;
153. > 	if (!pbe_algs) pbe_algs = sk_new (pbe_cmp);
154.   	if (!(pbe_tmp = (EVP_PBE_CTL*) Malloc (sizeof(EVP_PBE_CTL)))) {
155.   		EVPerr(EVP_F_EVP_PBE_ALG_ADD,ERR_R_MALLOC_FAILURE);

crypto/stack/stack.c:112:1: start of procedure sk_new()
  110.   	}
  111.   
  112. > STACK *sk_new(int (*c)())
  113.   	{
  114.   	STACK *ret;

crypto/stack/stack.c:117:6: Taking true branch
  115.   	int i;
  116.   
  117.   	if ((ret=(STACK *)Malloc(sizeof(STACK))) == NULL)
              ^
  118.   		goto err0;
  119.   	if ((ret->data=(char **)Malloc(sizeof(char *)*MIN_NODES)) == NULL)

crypto/stack/stack.c:130:1: 
  128.   err1:
  129.   	Free((char *)ret);
  130. > err0:
  131.   	return(NULL);
  132.   	}

crypto/stack/stack.c:131:2: 
  129.   	Free((char *)ret);
  130.   err0:
  131. > 	return(NULL);
  132.   	}
  133.   

crypto/stack/stack.c:132:2: return from a call to sk_new
  130.   err0:
  131.   	return(NULL);
  132.   	}
          ^
  133.   
  134.   int sk_insert(STACK *st, char *data, int loc)

crypto/evp/evp_pbe.c:154:8: Taking false branch
152.   	EVP_PBE_CTL *pbe_tmp;
153.   	if (!pbe_algs) pbe_algs = sk_new (pbe_cmp);
154.   	if (!(pbe_tmp = (EVP_PBE_CTL*) Malloc (sizeof(EVP_PBE_CTL)))) {
              ^
155.   		EVPerr(EVP_F_EVP_PBE_ALG_ADD,ERR_R_MALLOC_FAILURE);
156.   		return 0;

crypto/evp/evp_pbe.c:158:2: 
156.   		return 0;
157.   	}
158. > 	pbe_tmp->pbe_nid = nid;
159.   	pbe_tmp->cipher = cipher;
160.   	pbe_tmp->md = md;

crypto/evp/evp_pbe.c:159:2: 
157.   	}
158.   	pbe_tmp->pbe_nid = nid;
159. > 	pbe_tmp->cipher = cipher;
160.   	pbe_tmp->md = md;
161.   	pbe_tmp->keygen = keygen;

crypto/evp/evp_pbe.c:160:2: 
158.   	pbe_tmp->pbe_nid = nid;
159.   	pbe_tmp->cipher = cipher;
160. > 	pbe_tmp->md = md;
161.   	pbe_tmp->keygen = keygen;
162.   	sk_push (pbe_algs, (char *)pbe_tmp);

crypto/evp/evp_pbe.c:161:2: 
159.   	pbe_tmp->cipher = cipher;
160.   	pbe_tmp->md = md;
161. > 	pbe_tmp->keygen = keygen;
162.   	sk_push (pbe_algs, (char *)pbe_tmp);
163.   	return 1;

crypto/evp/evp_pbe.c:162:2: 
160.   	pbe_tmp->md = md;
161.   	pbe_tmp->keygen = keygen;
162. > 	sk_push (pbe_algs, (char *)pbe_tmp);
163.   	return 1;
164.   }

crypto/stack/stack.c:237:1: start of procedure sk_push()
  235.   	}
  236.   
  237. > int sk_push(STACK *st, char *data)
  238.   	{
  239.   	return(sk_insert(st,data,st->num));

crypto/stack/stack.c:239:2: Skipping sk_insert(): empty list of specs
  237.   int sk_push(STACK *st, char *data)
  238.   	{
  239.   	return(sk_insert(st,data,st->num));
          ^
  240.   	}
  241.   
