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:
295f3a2
)
Sanity check buffer length.
author
Dr. Stephen Henson
<steve@openssl.org>
Thu, 28 Apr 2016 12:09:27 +0000
(13:09 +0100)
committer
Dr. Stephen Henson
<steve@openssl.org>
Fri, 29 Apr 2016 18:42:21 +0000
(19:42 +0100)
Reject zero length buffers passed to X509_NAME_onelne().
Issue reported by Guido Vranken.
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/x509/x509_obj.c
patch
|
blob
|
history
diff --git
a/crypto/x509/x509_obj.c
b/crypto/x509/x509_obj.c
index ac871b40294763b41062767eb8f299e82354b70d..920828373c175075a7cbaafa2fef91b08f91bfa6 100644
(file)
--- a/
crypto/x509/x509_obj.c
+++ b/
crypto/x509/x509_obj.c
@@
-86,6
+86,8
@@
char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
goto err;
b->data[0] = '\0';
len = 200;
+ } else if (len == 0) {
+ return NULL;
}
if (a == NULL) {
if (b) {