Make sure not to read beyond end of buffer
[oweals/openssl.git] / crypto / pkcs12 / p12_p8e.c
index 7a17b31b5d7486dbe8c51365802db7ba4a1ece52..3d47956652a81a0753b39d9e50e5d81ee0574ae0 100644 (file)
@@ -65,7 +65,7 @@ X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher,
                         unsigned char *salt, int saltlen, int iter,
                                                PKCS8_PRIV_KEY_INFO *p8inf)
 {
-       X509_SIG *p8;
+       X509_SIG *p8 = NULL;
        X509_ALGOR *pbe;
 
        if (!(p8 = X509_SIG_new())) {