summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2015-09-15 00:07:02 +0200
committerKurt Roeckx <kurt@roeckx.be>2015-09-15 00:07:54 +0200
commit728bcd59d3d41e152aead0d15acc51a8958536d3 (patch)
treeb3f679e466f561665176ee75addbd077847e30f4 /crypto/x509v3
parent5116aeeacbac3f22792cfa9a370069f00adc2a49 (diff)
d2i: don't update input pointer on failure
Reviewed-by: Dr. Stephen Henson <steve@openssl.org> MR #1005 (cherry picked from commit a46c9789ce2aecedceef119e9883513c7a49f1ca)
Diffstat (limited to 'crypto/x509v3')
-rw-r--r--crypto/x509v3/v3_scts.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_scts.c b/crypto/x509v3/v3_scts.c
index 6e0b8d6844..0b7c68180e 100644
--- a/crypto/x509v3/v3_scts.c
+++ b/crypto/x509v3/v3_scts.c
@@ -190,8 +190,9 @@ static STACK_OF(SCT) *d2i_SCT_LIST(STACK_OF(SCT) **a,
SCT *sct;
unsigned char *p, *p2;
unsigned short listlen, sctlen = 0, fieldlen;
+ const unsigned char *q = *pp;
- if (d2i_ASN1_OCTET_STRING(&oct, pp, length) == NULL)
+ if (d2i_ASN1_OCTET_STRING(&oct, &q, length) == NULL)
return NULL;
if (oct->length < 2)
goto done;
@@ -279,6 +280,7 @@ static STACK_OF(SCT) *d2i_SCT_LIST(STACK_OF(SCT) **a,
done:
ASN1_OCTET_STRING_free(oct);
+ *pp = q;
return sk;
err: