Sanity check buffer length.
Reject zero length buffers passed to X509_NAME_onelne(). Issue reported by Guido Vranken. Reviewed-by: Matt Caswell <matt@openssl.org>
This commit is contained in:
parent
295f3a2491
commit
b33d1141b6
1 changed files with 2 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue