crypto/evp/evp_pbe.c:99: error: NULL_DEREFERENCE
  pointer `pbetmp` last assigned on line 98 could be null and is dereferenced at line 99, column 8.
Showing all 18 steps of the trace


crypto/evp/evp_pbe.c:77:1: start of procedure EVP_PBE_CipherInit()
75.   } EVP_PBE_CTL;
76.   
77. > int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
78.   	     unsigned char *salt, int saltlen, int iter, EVP_CIPHER_CTX *ctx,
79.   	     int en_de)

crypto/evp/evp_pbe.c:85:2: 
83.   	unsigned char key[EVP_MAX_KEY_LENGTH], iv[EVP_MAX_IV_LENGTH];
84.   	int i;
85. > 	pbelu.pbe_nid = OBJ_obj2nid(pbe_obj);
86.   	if (pbelu.pbe_nid != NID_undef) i = sk_find(pbe_algs, (char *)&pbelu);
87.   	else i = -1;

crypto/objects/obj_dat.c:354:1: start of procedure OBJ_obj2nid()
  352.   	}
  353.   
  354. > int OBJ_obj2nid(ASN1_OBJECT *a)
  355.   	{
  356.   	ASN1_OBJECT **op;

crypto/objects/obj_dat.c:359:6: Taking false branch
  357.   	ADDED_OBJ ad,*adp;
  358.   
  359.   	if (a == NULL)
              ^
  360.   		return(NID_undef);
  361.   	if (a->nid != 0)

crypto/objects/obj_dat.c:361:6: Taking true branch
  359.   	if (a == NULL)
  360.   		return(NID_undef);
  361.   	if (a->nid != 0)
              ^
  362.   		return(a->nid);
  363.   

crypto/objects/obj_dat.c:362:3: 
  360.   		return(NID_undef);
  361.   	if (a->nid != 0)
  362. > 		return(a->nid);
  363.   
  364.   	if (added != NULL)

crypto/objects/obj_dat.c:376:2: return from a call to OBJ_obj2nid
  374.   		return(NID_undef);
  375.   	return((*op)->nid);
  376.   	}
          ^
  377.   
  378.   /* Convert an object name into an ASN1_OBJECT

crypto/evp/evp_pbe.c:86:6: Taking true branch
84.   	int i;
85.   	pbelu.pbe_nid = OBJ_obj2nid(pbe_obj);
86.   	if (pbelu.pbe_nid != NID_undef) i = sk_find(pbe_algs, (char *)&pbelu);
           ^
87.   	else i = -1;
88.   

crypto/evp/evp_pbe.c:86:34: Skipping sk_find(): empty list of specs
84.   	int i;
85.   	pbelu.pbe_nid = OBJ_obj2nid(pbe_obj);
86.   	if (pbelu.pbe_nid != NID_undef) i = sk_find(pbe_algs, (char *)&pbelu);
                                       ^
87.   	else i = -1;
88.   

crypto/evp/evp_pbe.c:89:6: Taking false branch
87.   	else i = -1;
88.   
89.   	if (i == -1) {
           ^
90.   		char obj_tmp[80];
91.   		EVPerr(EVP_F_EVP_PBE_CIPHERINIT,EVP_R_UNKNOWN_PBE_ALGORITHM);

crypto/evp/evp_pbe.c:97:6: Taking true branch
95.   		return 0;
96.   	}
97.   	if (passlen == -1) passlen = strlen(pass);
            ^
98.   	pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i);
99.   	i = (*pbetmp->keygen)(pass, passlen, salt, saltlen, iter,

crypto/evp/evp_pbe.c:97:21: 
95.   		return 0;
96.   	}
97. > 	if (passlen == -1) passlen = strlen(pass);
98.   	pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i);
99.   	i = (*pbetmp->keygen)(pass, passlen, salt, saltlen, iter,

crypto/evp/evp_pbe.c:98:2: 
96.   	}
97.   	if (passlen == -1) passlen = strlen(pass);
98. > 	pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i);
99.   	i = (*pbetmp->keygen)(pass, passlen, salt, saltlen, iter,
100.   					 pbetmp->cipher, pbetmp->md, key, iv);

crypto/stack/stack.c:293:1: start of procedure sk_value()
  291.   }
  292.   
  293. > char *sk_value(STACK *st, int i)
  294.   {
  295.   	if(st == NULL) return NULL;

crypto/stack/stack.c:295:5: Taking true branch
  293.   char *sk_value(STACK *st, int i)
  294.   {
  295.   	if(st == NULL) return NULL;
             ^
  296.   	return st->data[i];
  297.   }

crypto/stack/stack.c:295:17: 
  293.   char *sk_value(STACK *st, int i)
  294.   {
  295. > 	if(st == NULL) return NULL;
  296.   	return st->data[i];
  297.   }

crypto/stack/stack.c:297:1: return from a call to sk_value
  295.   	if(st == NULL) return NULL;
  296.   	return st->data[i];
  297. > }
  298.   
  299.   char *sk_set(STACK *st, int i, char *value)

crypto/evp/evp_pbe.c:99:2: 
97.   	if (passlen == -1) passlen = strlen(pass);
98.   	pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i);
99. > 	i = (*pbetmp->keygen)(pass, passlen, salt, saltlen, iter,
100.   					 pbetmp->cipher, pbetmp->md, key, iv);
101.   	if (!i) {
