mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 19:04:02 -05:00
TLS client: Fix peer certificate event checking for probing
conn->cred might be NULL here, so check for that explicitly before checking whether conn->cred->cert_probe is set. This fixes a potential NULL pointer dereference when going through peer certificates with event_cb functionality enabled. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
e5bffe1aa9
commit
fdd8a2f0b8
@ -290,7 +290,7 @@ static void tls_peer_cert_event(struct tlsv1_client *conn, int depth,
|
||||
return;
|
||||
|
||||
os_memset(&ev, 0, sizeof(ev));
|
||||
if (conn->cred->cert_probe || conn->cert_in_cb) {
|
||||
if ((conn->cred && conn->cred->cert_probe) || conn->cert_in_cb) {
|
||||
cert_buf = wpabuf_alloc_copy(cert->cert_start,
|
||||
cert->cert_len);
|
||||
ev.peer_cert.cert = cert_buf;
|
||||
|
Loading…
Reference in New Issue
Block a user