projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Swap to using _longjmp/_setjmp instead of longjmp/setjmp
[oweals/openssl.git]
/
crypto
/
asn1
/
x_pubkey.c
diff --git
a/crypto/asn1/x_pubkey.c
b/crypto/asn1/x_pubkey.c
index d20afb982eeb1774459a7ce6c3f7c6649afae729..d20019005c92c52a33bcdb395f52f8c4e3d7d2fc 100644
(file)
--- a/
crypto/asn1/x_pubkey.c
+++ b/
crypto/asn1/x_pubkey.c
@@
-184,13
+184,16
@@
EVP_PKEY *d2i_PUBKEY(EVP_PKEY **a, const unsigned char **pp, long length)
{
X509_PUBKEY *xpk;
EVP_PKEY *pktmp;
{
X509_PUBKEY *xpk;
EVP_PKEY *pktmp;
- xpk = d2i_X509_PUBKEY(NULL, pp, length);
+ const unsigned char *q;
+ q = *pp;
+ xpk = d2i_X509_PUBKEY(NULL, &q, length);
if (!xpk)
return NULL;
pktmp = X509_PUBKEY_get(xpk);
X509_PUBKEY_free(xpk);
if (!pktmp)
return NULL;
if (!xpk)
return NULL;
pktmp = X509_PUBKEY_get(xpk);
X509_PUBKEY_free(xpk);
if (!pktmp)
return NULL;
+ *pp = q;
if (a) {
EVP_PKEY_free(*a);
*a = pktmp;
if (a) {
EVP_PKEY_free(*a);
*a = pktmp;
@@
-243,7
+246,7
@@
int i2d_RSA_PUBKEY(RSA *a, unsigned char **pp)
if (!a)
return 0;
pktmp = EVP_PKEY_new();
if (!a)
return 0;
pktmp = EVP_PKEY_new();
- if (
!pktmp
) {
+ if (
pktmp == NULL
) {
ASN1err(ASN1_F_I2D_RSA_PUBKEY, ERR_R_MALLOC_FAILURE);
return 0;
}
ASN1err(ASN1_F_I2D_RSA_PUBKEY, ERR_R_MALLOC_FAILURE);
return 0;
}
@@
-283,7
+286,7
@@
int i2d_DSA_PUBKEY(DSA *a, unsigned char **pp)
if (!a)
return 0;
pktmp = EVP_PKEY_new();
if (!a)
return 0;
pktmp = EVP_PKEY_new();
- if (
!pktmp
) {
+ if (
pktmp == NULL
) {
ASN1err(ASN1_F_I2D_DSA_PUBKEY, ERR_R_MALLOC_FAILURE);
return 0;
}
ASN1err(ASN1_F_I2D_DSA_PUBKEY, ERR_R_MALLOC_FAILURE);
return 0;
}