mirror of
https://github.com/curl/curl.git
synced 2026-07-28 11:13:07 +03:00
http2: return error on OOM in push headers
Reported-by: M42kL33 on hackerone Bug: https://hackerone.com/reports/3636044 Closes #21171
This commit is contained in:
parent
2f93a0e6bb
commit
9b36748938
1 changed files with 5 additions and 2 deletions
|
|
@ -1488,8 +1488,11 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
|
|||
stream->push_headers = headp;
|
||||
}
|
||||
h = curl_maprintf("%s:%s", name, value);
|
||||
if(h)
|
||||
stream->push_headers[stream->push_headers_used++] = h;
|
||||
if(!h) {
|
||||
free_push_headers(stream);
|
||||
return NGHTTP2_ERR_CALLBACK_FAILURE;
|
||||
}
|
||||
stream->push_headers[stream->push_headers_used++] = h;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue