aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/tasn_dec.c
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2015-08-17 16:02:18 +0200
committerKurt Roeckx <kurt@roeckx.be>2015-09-14 23:53:03 +0200
commita46c9789ce2aecedceef119e9883513c7a49f1ca (patch)
treeefd119b8addcab9b5e16870dd4dff7da1192bfc6 /crypto/asn1/tasn_dec.c
parentdf6da24bda457b724ba3e894e6c329a9b93d536f (diff)
downloadopenssl-a46c9789ce2aecedceef119e9883513c7a49f1ca.tar.gz
d2i: don't update input pointer on failure
Reviewed-by: Dr. Stephen Henson <steve@openssl.org> MR #1005
Diffstat (limited to 'crypto/asn1/tasn_dec.c')
-rw-r--r--crypto/asn1/tasn_dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c
index 7a6414ad04..732b4253d1 100644
--- a/crypto/asn1/tasn_dec.c
+++ b/crypto/asn1/tasn_dec.c
@@ -281,9 +281,9 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
}
asn1_set_choice_selector(pval, i, it);
- *in = p;
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
goto auxerr;
+ *in = p;
return 1;
case ASN1_ITYPE_NDEF_SEQUENCE:
@@ -420,9 +420,9 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
/* Save encoding */
if (!asn1_enc_save(pval, *in, p - *in, it))
goto auxerr;
- *in = p;
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
goto auxerr;
+ *in = p;
return 1;
default: