int ok=0;
STACK_OF(X509_INFO) *ret=NULL;
unsigned int i,raw,ptype;
- d2i_of_void *d2i;
+ d2i_of_void *d2i = 0;
if (sk == NULL)
{
{
if ( (xi->enc_data!=NULL) && (xi->enc_len>0) )
{
+ if (enc == NULL)
+ {
+ PEMerr(PEM_F_PEM_X509_INFO_WRITE_BIO,PEM_R_CIPHER_IS_NULL);
+ goto err;
+ }
+
/* copy from weirdo names into more normal things */
iv=xi->enc_cipher.iv;
data=(unsigned char *)xi->enc_data;