mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:03:42 +03:00
h3-proxy: fix NULL deref when non-:status header arrives before :status
Closes #22449
This commit is contained in:
parent
6e130eb484
commit
decc609085
1 changed files with 3 additions and 0 deletions
|
|
@ -431,6 +431,9 @@ static int cb_h3_proxy_recv_header(nghttp3_conn *conn, int64_t stream_id,
|
|||
pctx->tunnel.resp = resp;
|
||||
}
|
||||
else {
|
||||
if(!pctx->tunnel.resp) {
|
||||
return NGHTTP3_ERR_CALLBACK_FAILURE;
|
||||
}
|
||||
/* store as an HTTP1-style header */
|
||||
CURL_TRC_CF(data, cf, "[%" PRId64 "] header: %.*s: %.*s", stream_id,
|
||||
(int)h3name.len, h3name.base, (int)h3val.len, h3val.base);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue