mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-09 13:04:42 +00:00
openssl_stream: fix NULL pointer dereference
This commit is contained in:
parent
2baf854e97
commit
05bf67b901
@ -383,6 +383,8 @@ static int verify_server_cert(SSL *ssl, const char *host)
|
|||||||
GITERR_CHECK_ALLOC(peer_cn);
|
GITERR_CHECK_ALLOC(peer_cn);
|
||||||
memcpy(peer_cn, ASN1_STRING_data(str), size);
|
memcpy(peer_cn, ASN1_STRING_data(str), size);
|
||||||
peer_cn[size] = '\0';
|
peer_cn[size] = '\0';
|
||||||
|
} else {
|
||||||
|
goto cert_fail_name;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int size = ASN1_STRING_to_UTF8(&peer_cn, str);
|
int size = ASN1_STRING_to_UTF8(&peer_cn, str);
|
||||||
|
Loading…
Reference in New Issue
Block a user