projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66ce286
)
Fix i2d_X509_AUX: pp can be NULL.
author
Dr. Stephen Henson
<steve@openssl.org>
Mon, 2 May 2016 16:33:50 +0000
(17:33 +0100)
committer
Dr. Stephen Henson
<steve@openssl.org>
Mon, 2 May 2016 21:50:19 +0000
(22:50 +0100)
Reported by David Benjamin
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(cherry picked from commit
05aef4bbdbc18e7b9490512cdee41e8a608bcc0e
)
crypto/asn1/x_x509.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/x_x509.c
b/crypto/asn1/x_x509.c
index 38ede71bb9802e7515efb16f448ddd892c0c1169..1500871577d636e3b49359f5624386f54ec7452f 100644
(file)
--- a/
crypto/asn1/x_x509.c
+++ b/
crypto/asn1/x_x509.c
@@
-202,14
+202,15
@@
X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
int i2d_X509_AUX(X509 *a, unsigned char **pp)
{
int length, tmplen;
- unsigned char *start =
*pp
;
+ unsigned char *start =
pp != NULL ? *pp : NULL
;
length = i2d_X509(a, pp);
if (length < 0 || a == NULL)
return length;
tmplen = i2d_X509_CERT_AUX(a->aux, pp);
if (tmplen < 0) {
- *pp = start;
+ if (start != NULL)
+ *pp = start;
return tmplen;
}
length += tmplen;