diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2015-08-17 16:02:18 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2015-09-14 23:53:03 +0200 |
commit | a46c9789ce2aecedceef119e9883513c7a49f1ca (patch) | |
tree | efd119b8addcab9b5e16870dd4dff7da1192bfc6 /crypto/x509v3 | |
parent | df6da24bda457b724ba3e894e6c329a9b93d536f (diff) | |
download | openssl-a46c9789ce2aecedceef119e9883513c7a49f1ca.zip openssl-a46c9789ce2aecedceef119e9883513c7a49f1ca.tar.gz openssl-a46c9789ce2aecedceef119e9883513c7a49f1ca.tar.bz2 |
d2i: don't update input pointer on failure
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
MR #1005
Diffstat (limited to 'crypto/x509v3')
-rw-r--r-- | crypto/x509v3/v3_scts.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/x509v3/v3_scts.c b/crypto/x509v3/v3_scts.c index f93fdfc..b1505fe 100644 --- a/crypto/x509v3/v3_scts.c +++ b/crypto/x509v3/v3_scts.c @@ -183,8 +183,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; @@ -272,6 +273,7 @@ static STACK_OF(SCT) *d2i_SCT_LIST(STACK_OF(SCT) **a, done: ASN1_OCTET_STRING_free(oct); + *pp = q; return sk; err: |