crypto/pem/pem_lib.c:484: error: UNINITIALIZED_VALUE
  The value read from i was never initialized.
Showing all 1 steps of the trace


crypto/pem/pem_lib.c:484:3: 
482.   	OPENSSL_cleanse((char *)key,sizeof(key));
483.   	if (o)
484. > 		j+=i;
485.   	else
486.   		{

int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen,
	     pem_password_cb *callback,void *u)
	{
	int i,j,o,klen;
	long len;
	EVP_CIPHER_CTX ctx;
	unsigned char key[EVP_MAX_KEY_LENGTH];
	char buf[PEM_BUFSIZE];
	len= *plen;
	if (cipher->cipher == NULL) return(1);
	if (callback == NULL)
		klen=PEM_def_callback(buf,PEM_BUFSIZE,0,u);
	else
		klen=callback(buf,PEM_BUFSIZE,0,u);
	if (klen <= 0)
		{
		PEMerr(PEM_F_PEM_DO_HEADER,PEM_R_BAD_PASSWORD_READ);
		return(0);
		}
#ifdef CHARSET_EBCDIC
	ebcdic2ascii(buf, buf, klen);
#endif
	if (!EVP_BytesToKey(cipher->cipher,EVP_md5(),&(cipher->iv[0]),
		(unsigned char *)buf,klen,1,key,NULL))
		return 0;
	j=(int)len;
	EVP_CIPHER_CTX_init(&ctx);
	o = EVP_DecryptInit_ex(&ctx,cipher->cipher,NULL, key,&(cipher->iv[0]));
	if (o)
		o = EVP_DecryptUpdate(&ctx,data,&i,data,j);
	if (o)
		o = EVP_DecryptFinal_ex(&ctx,&(data[i]),&j);
	EVP_CIPHER_CTX_cleanup(&ctx);
	OPENSSL_cleanse((char *)buf,sizeof(buf));
	OPENSSL_cleanse((char *)key,sizeof(key));
	if (o)
		j+=i;
	else
		{
		PEMerr(PEM_F_PEM_DO_HEADER,PEM_R_BAD_DECRYPT);
		return(0);
		}
	*plen=j;
	return(1);
	}
['int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen,\n\t     pem_password_cb *callback,void *u)\n\t{\n\tint i,j,o,klen;\n\tlong len;\n\tEVP_CIPHER_CTX ctx;\n\tunsigned char key[EVP_MAX_KEY_LENGTH];\n\tchar buf[PEM_BUFSIZE];\n\tlen= *plen;\n\tif (cipher->cipher == NULL) return(1);\n\tif (callback == NULL)\n\t\tklen=PEM_def_callback(buf,PEM_BUFSIZE,0,u);\n\telse\n\t\tklen=callback(buf,PEM_BUFSIZE,0,u);\n\tif (klen <= 0)\n\t\t{\n\t\tPEMerr(PEM_F_PEM_DO_HEADER,PEM_R_BAD_PASSWORD_READ);\n\t\treturn(0);\n\t\t}\n#ifdef CHARSET_EBCDIC\n\tebcdic2ascii(buf, buf, klen);\n#endif\n\tif (!EVP_BytesToKey(cipher->cipher,EVP_md5(),&(cipher->iv[0]),\n\t\t(unsigned char *)buf,klen,1,key,NULL))\n\t\treturn 0;\n\tj=(int)len;\n\tEVP_CIPHER_CTX_init(&ctx);\n\to = EVP_DecryptInit_ex(&ctx,cipher->cipher,NULL, key,&(cipher->iv[0]));\n\tif (o)\n\t\to = EVP_DecryptUpdate(&ctx,data,&i,data,j);\n\tif (o)\n\t\to = EVP_DecryptFinal_ex(&ctx,&(data[i]),&j);\n\tEVP_CIPHER_CTX_cleanup(&ctx);\n\tOPENSSL_cleanse((char *)buf,sizeof(buf));\n\tOPENSSL_cleanse((char *)key,sizeof(key));\n\tif (o)\n\t\tj+=i;\n\telse\n\t\t{\n\t\tPEMerr(PEM_F_PEM_DO_HEADER,PEM_R_BAD_DECRYPT);\n\t\treturn(0);\n\t\t}\n\t*plen=j;\n\treturn(1);\n\t}']