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> (cherry picked from commit b33d1141b6dcce947708b984c5e9e91dad3d675d)
This commit is contained in:
parent
53d6c14bef
commit
0b34cf8223
@ -86,6 +86,8 @@ char *X509_NAME_oneline(X509_NAME *a, char *buf, int len)
|
|||||||
goto err;
|
goto err;
|
||||||
b->data[0] = '\0';
|
b->data[0] = '\0';
|
||||||
len = 200;
|
len = 200;
|
||||||
|
} else if (len == 0) {
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
if (a == NULL) {
|
if (a == NULL) {
|
||||||
if (b) {
|
if (b) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user