crypto/pkcs7/pk7_doit.c:315: error: NULL_DEREFERENCE
  pointer `evp_cipher` last assigned on line 261 could be null and is dereferenced at line 315, column 5.
Showing all 24 steps of the trace


crypto/pkcs7/pk7_doit.c:253:1: start of procedure PKCS7_dataDecode()
251.   
252.   /* int */
253. > BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
254.   	{
255.   	int i,j;

crypto/pkcs7/pk7_doit.c:256:2: 
254.   	{
255.   	int i,j;
256. > 	BIO *out=NULL,*btmp=NULL,*etmp=NULL,*bio=NULL;
257.   	unsigned char *tmp=NULL;
258.   	X509_ALGOR *xa;

crypto/pkcs7/pk7_doit.c:257:2: 
255.   	int i,j;
256.   	BIO *out=NULL,*btmp=NULL,*etmp=NULL,*bio=NULL;
257. > 	unsigned char *tmp=NULL;
258.   	X509_ALGOR *xa;
259.   	ASN1_OCTET_STRING *data_body=NULL;

crypto/pkcs7/pk7_doit.c:259:2: 
257.   	unsigned char *tmp=NULL;
258.   	X509_ALGOR *xa;
259. > 	ASN1_OCTET_STRING *data_body=NULL;
260.   	const EVP_MD *evp_md;
261.   	const EVP_CIPHER *evp_cipher=NULL;

crypto/pkcs7/pk7_doit.c:261:2: 
259.   	ASN1_OCTET_STRING *data_body=NULL;
260.   	const EVP_MD *evp_md;
261. > 	const EVP_CIPHER *evp_cipher=NULL;
262.   	EVP_CIPHER_CTX *evp_ctx=NULL;
263.   	X509_ALGOR *enc_alg=NULL;

crypto/pkcs7/pk7_doit.c:262:2: 
260.   	const EVP_MD *evp_md;
261.   	const EVP_CIPHER *evp_cipher=NULL;
262. > 	EVP_CIPHER_CTX *evp_ctx=NULL;
263.   	X509_ALGOR *enc_alg=NULL;
264.   	STACK_OF(X509_ALGOR) *md_sk=NULL;

crypto/pkcs7/pk7_doit.c:263:2: 
261.   	const EVP_CIPHER *evp_cipher=NULL;
262.   	EVP_CIPHER_CTX *evp_ctx=NULL;
263. > 	X509_ALGOR *enc_alg=NULL;
264.   	STACK_OF(X509_ALGOR) *md_sk=NULL;
265.   	STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL;

crypto/pkcs7/pk7_doit.c:264:2: 
262.   	EVP_CIPHER_CTX *evp_ctx=NULL;
263.   	X509_ALGOR *enc_alg=NULL;
264. > 	STACK_OF(X509_ALGOR) *md_sk=NULL;
265.   	STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL;
266.   	X509_ALGOR *xalg=NULL;

crypto/pkcs7/pk7_doit.c:265:2: 
263.   	X509_ALGOR *enc_alg=NULL;
264.   	STACK_OF(X509_ALGOR) *md_sk=NULL;
265. > 	STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL;
266.   	X509_ALGOR *xalg=NULL;
267.   	PKCS7_RECIP_INFO *ri=NULL;

crypto/pkcs7/pk7_doit.c:266:2: 
264.   	STACK_OF(X509_ALGOR) *md_sk=NULL;
265.   	STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL;
266. > 	X509_ALGOR *xalg=NULL;
267.   	PKCS7_RECIP_INFO *ri=NULL;
268.   #ifndef NO_RC2

crypto/pkcs7/pk7_doit.c:267:2: 
265.   	STACK_OF(PKCS7_RECIP_INFO) *rsk=NULL;
266.   	X509_ALGOR *xalg=NULL;
267. > 	PKCS7_RECIP_INFO *ri=NULL;
268.   #ifndef NO_RC2
269.   	char is_rc2 = 0;

crypto/pkcs7/pk7_doit.c:269:2: 
267.   	PKCS7_RECIP_INFO *ri=NULL;
268.   #ifndef NO_RC2
269. > 	char is_rc2 = 0;
270.   #endif
271.   /*	EVP_PKEY *pkey; */

crypto/pkcs7/pk7_doit.c:276:2: 
274.   #endif
275.   
276. > 	i=OBJ_obj2nid(p7->type);
277.   	p7->state=PKCS7_S_HEADER;
278.   

crypto/objects/obj_dat.c:350:1: start of procedure OBJ_obj2nid()
  348.   	}
  349.   
  350. > int OBJ_obj2nid(ASN1_OBJECT *a)
  351.   	{
  352.   	ASN1_OBJECT **op;

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

crypto/objects/obj_dat.c:357:6: Taking true branch
  355.   	if (a == NULL)
  356.   		return(NID_undef);
  357.   	if (a->nid != 0)
              ^
  358.   		return(a->nid);
  359.   

crypto/objects/obj_dat.c:358:3: 
  356.   		return(NID_undef);
  357.   	if (a->nid != 0)
  358. > 		return(a->nid);
  359.   
  360.   	if (added != NULL)

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

crypto/pkcs7/pk7_doit.c:277:2: 
275.   
276.   	i=OBJ_obj2nid(p7->type);
277. > 	p7->state=PKCS7_S_HEADER;
278.   
279.   	switch (i)

crypto/pkcs7/pk7_doit.c:279:2: 
277.   	p7->state=PKCS7_S_HEADER;
278.   
279. > 	switch (i)
280.   		{
281.   	case NID_pkcs7_signed:

crypto/pkcs7/pk7_doit.c:281:2: Switch condition is true. Entering switch case
279.   	switch (i)
280.   		{
281.   	case NID_pkcs7_signed:
        ^
282.   		data_body=p7->d.sign->contents->d.data;
283.   		md_sk=p7->d.sign->md_algs;

crypto/pkcs7/pk7_doit.c:282:3: 
280.   		{
281.   	case NID_pkcs7_signed:
282. > 		data_body=p7->d.sign->contents->d.data;
283.   		md_sk=p7->d.sign->md_algs;
284.   		break;

crypto/pkcs7/pk7_doit.c:283:3: 
281.   	case NID_pkcs7_signed:
282.   		data_body=p7->d.sign->contents->d.data;
283. > 		md_sk=p7->d.sign->md_algs;
284.   		break;
285.   	case NID_pkcs7_signedAndEnveloped:

crypto/pkcs7/pk7_doit.c:315:5: 
313.   		}
314.   
315. > 	if(EVP_CIPHER_nid(evp_cipher) == NID_rc2_cbc)
316.   		{
317.   #ifndef NO_RC2		
