diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2015-07-19 18:26:00 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2015-07-19 18:26:00 +0000 |
commit | eafe1f0cacc5cfeb27ada3c8b89411a0a8ad7e29 (patch) | |
tree | 543e6d28df1500c9fca23aa107f31d4ebd82af8d /lib/libcrypto/ts/ts_rsp_verify.c | |
parent | b8ced6fbcc8ba749dd1630246443d23f46b7c8ec (diff) |
Verify ASN1 objects types before attempting to access them as a particular
type.
ok guenther@ doug@
Diffstat (limited to 'lib/libcrypto/ts/ts_rsp_verify.c')
-rw-r--r-- | lib/libcrypto/ts/ts_rsp_verify.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libcrypto/ts/ts_rsp_verify.c b/lib/libcrypto/ts/ts_rsp_verify.c index 797877011c2..204c6a9df8b 100644 --- a/lib/libcrypto/ts/ts_rsp_verify.c +++ b/lib/libcrypto/ts/ts_rsp_verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_rsp_verify.c,v 1.15 2015/07/19 05:42:55 miod Exp $ */ +/* $OpenBSD: ts_rsp_verify.c,v 1.16 2015/07/19 18:25:59 miod Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -312,6 +312,8 @@ ESS_get_signing_cert(PKCS7_SIGNER_INFO *si) NID_id_smime_aa_signingCertificate); if (!attr) return NULL; + if (attr->type != V_ASN1_SEQUENCE) + return NULL; p = attr->value.sequence->data; return d2i_ESS_SIGNING_CERT(NULL, &p, attr->value.sequence->length); } |