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:
6335f83
)
Check for V_ASN1_BOOLEAN/V_ASN1_NULL in X509_ATTRIBUTE_get0_data
author
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Mon, 1 Jul 2019 07:41:47 +0000
(09:41 +0200)
committer
Bernd Edlinger
<bernd.edlinger@hotmail.de>
Tue, 2 Jul 2019 14:22:02 +0000
(16:22 +0200)
The member value.ptr is undefined for those ASN1 types.
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9278)
crypto/x509/x509_att.c
patch
|
blob
|
history
diff --git
a/crypto/x509/x509_att.c
b/crypto/x509/x509_att.c
index f1cd9df23e7186e2f60dbb06731dcfb05dd46483..317a45a4fadb7cf6914a049a3ecf14ca02f5423d 100644
(file)
--- a/
crypto/x509/x509_att.c
+++ b/
crypto/x509/x509_att.c
@@
-314,7
+314,9
@@
void *X509_ATTRIBUTE_get0_data(X509_ATTRIBUTE *attr, int idx,
ttmp = X509_ATTRIBUTE_get0_type(attr, idx);
if (!ttmp)
return NULL;
- if (atrtype != ASN1_TYPE_get(ttmp)) {
+ if (atrtype == V_ASN1_BOOLEAN
+ || atrtype == V_ASN1_NULL
+ || atrtype != ASN1_TYPE_get(ttmp)) {
X509err(X509_F_X509_ATTRIBUTE_GET0_DATA, X509_R_WRONG_TYPE);
return NULL;
}