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


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

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

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

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

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

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

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

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

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

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

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

crypto/pkcs7/pk7_doit.c:267:2: 
265.   	X509_ALGOR *xalg=NULL;
266.   	PKCS7_RECIP_INFO *ri=NULL;
267. > 	char is_rc2 = 0;
268.   /*	EVP_PKEY *pkey; */
269.   #if 0

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

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/pkcs7/pk7_doit.c:274:2: 
272.   
273.   	i=OBJ_obj2nid(p7->type);
274. > 	p7->state=PKCS7_S_HEADER;
275.   
276.   	switch (i)

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

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

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

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

crypto/pkcs7/pk7_doit.c:312:5: 
310.   		}
311.   
312. > 	if(EVP_CIPHER_nid(evp_cipher) == NID_rc2_cbc) is_rc2 = 1; 
313.   
314.   	/* We will be checking the signature */
