crypto/pkcs7/pk7_smime.c:600: error: UNINITIALIZED_VALUE
  The value read from ret was never initialized.
Showing all 1 steps of the trace


crypto/pkcs7/pk7_smime.c:600:3: 
598.   		}
599.   		BIO_free_all(tmpmem);
600. > 		return ret;
601.   	}
602.   }

int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
{
	BIO *tmpmem;
	int ret, i;
	char buf[4096];
	if(!p7) {
		PKCS7err(PKCS7_F_PKCS7_DECRYPT,PKCS7_R_INVALID_NULL_POINTER);
		return 0;
	}
	if(!PKCS7_type_is_enveloped(p7)) {
		PKCS7err(PKCS7_F_PKCS7_DECRYPT,PKCS7_R_WRONG_CONTENT_TYPE);
		return 0;
	}
	if(cert && !X509_check_private_key(cert, pkey)) {
		PKCS7err(PKCS7_F_PKCS7_DECRYPT,
				PKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE);
		return 0;
	}
	if(!(tmpmem = PKCS7_dataDecode(p7, pkey, NULL, cert))) {
		PKCS7err(PKCS7_F_PKCS7_DECRYPT, PKCS7_R_DECRYPT_ERROR);
		return 0;
	}
	if (flags & PKCS7_TEXT) {
		BIO *tmpbuf, *bread;
		if(!(tmpbuf = BIO_new(BIO_f_buffer()))) {
			PKCS7err(PKCS7_F_PKCS7_DECRYPT, ERR_R_MALLOC_FAILURE);
			BIO_free_all(tmpmem);
			return 0;
		}
		if(!(bread = BIO_push(tmpbuf, tmpmem))) {
			PKCS7err(PKCS7_F_PKCS7_DECRYPT, ERR_R_MALLOC_FAILURE);
			BIO_free_all(tmpbuf);
			BIO_free_all(tmpmem);
			return 0;
		}
		ret = SMIME_text(bread, data);
		if (ret > 0 && BIO_method_type(tmpmem) == BIO_TYPE_CIPHER)
			{
			if (!BIO_get_cipher_status(tmpmem))
				ret = 0;
			}
		BIO_free_all(bread);
		return ret;
	} else {
		for(;;) {
			i = BIO_read(tmpmem, buf, sizeof(buf));
			if(i <= 0)
				{
				ret = 1;
				if (BIO_method_type(tmpmem) == BIO_TYPE_CIPHER)
					{
					if (!BIO_get_cipher_status(tmpmem))
						ret = 0;
					}
				break;
				}
			BIO_write(data, buf, i);
		}
		BIO_free_all(tmpmem);
		return ret;
	}
}
['int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)\n{\n\tBIO *tmpmem;\n\tint ret, i;\n\tchar buf[4096];\n\tif(!p7) {\n\t\tPKCS7err(PKCS7_F_PKCS7_DECRYPT,PKCS7_R_INVALID_NULL_POINTER);\n\t\treturn 0;\n\t}\n\tif(!PKCS7_type_is_enveloped(p7)) {\n\t\tPKCS7err(PKCS7_F_PKCS7_DECRYPT,PKCS7_R_WRONG_CONTENT_TYPE);\n\t\treturn 0;\n\t}\n\tif(cert && !X509_check_private_key(cert, pkey)) {\n\t\tPKCS7err(PKCS7_F_PKCS7_DECRYPT,\n\t\t\t\tPKCS7_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE);\n\t\treturn 0;\n\t}\n\tif(!(tmpmem = PKCS7_dataDecode(p7, pkey, NULL, cert))) {\n\t\tPKCS7err(PKCS7_F_PKCS7_DECRYPT, PKCS7_R_DECRYPT_ERROR);\n\t\treturn 0;\n\t}\n\tif (flags & PKCS7_TEXT) {\n\t\tBIO *tmpbuf, *bread;\n\t\tif(!(tmpbuf = BIO_new(BIO_f_buffer()))) {\n\t\t\tPKCS7err(PKCS7_F_PKCS7_DECRYPT, ERR_R_MALLOC_FAILURE);\n\t\t\tBIO_free_all(tmpmem);\n\t\t\treturn 0;\n\t\t}\n\t\tif(!(bread = BIO_push(tmpbuf, tmpmem))) {\n\t\t\tPKCS7err(PKCS7_F_PKCS7_DECRYPT, ERR_R_MALLOC_FAILURE);\n\t\t\tBIO_free_all(tmpbuf);\n\t\t\tBIO_free_all(tmpmem);\n\t\t\treturn 0;\n\t\t}\n\t\tret = SMIME_text(bread, data);\n\t\tif (ret > 0 && BIO_method_type(tmpmem) == BIO_TYPE_CIPHER)\n\t\t\t{\n\t\t\tif (!BIO_get_cipher_status(tmpmem))\n\t\t\t\tret = 0;\n\t\t\t}\n\t\tBIO_free_all(bread);\n\t\treturn ret;\n\t} else {\n\t\tfor(;;) {\n\t\t\ti = BIO_read(tmpmem, buf, sizeof(buf));\n\t\t\tif(i <= 0)\n\t\t\t\t{\n\t\t\t\tret = 1;\n\t\t\t\tif (BIO_method_type(tmpmem) == BIO_TYPE_CIPHER)\n\t\t\t\t\t{\n\t\t\t\t\tif (!BIO_get_cipher_status(tmpmem))\n\t\t\t\t\t\tret = 0;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tBIO_write(data, buf, i);\n\t\t}\n\t\tBIO_free_all(tmpmem);\n\t\treturn ret;\n\t}\n}']