detect/tls: add null check for tls.alpn keyword

Ticket: 8294

Fixes: 6c1238b7bd ("tls: Integrate ALPNs into HandshakeParams object")

May happen if we analyze TLS without seeing the hello
pull/15040/head
Philippe Antoine 8 months ago committed by Victor Julien
parent 49fd7001ff
commit cb76301581

@ -70,7 +70,7 @@ static bool TlsAlpnGetData(DetectEngineThreadCtx *det_ctx, const void *txv, cons
connp = &ssl_state->server_connp;
}
if (SCTLSHandshakeGetALPN(connp->hs, idx, &d)) {
if (connp->hs && SCTLSHandshakeGetALPN(connp->hs, idx, &d)) {
*buf = d.data;
*buf_len = (uint32_t)d.len;
return true;

Loading…
Cancel
Save