mirror of
https://github.com/curl/curl.git
synced 2026-07-22 21:07:18 +03:00
http2: check push header names by length first
Reported-by: Joshua Rogers Closes #18930
This commit is contained in:
parent
dae19dd94a
commit
93e91e965e
1 changed files with 2 additions and 1 deletions
|
|
@ -1590,7 +1590,8 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
|
|||
if(frame->hd.type == NGHTTP2_PUSH_PROMISE) {
|
||||
char *h;
|
||||
|
||||
if(!strcmp(HTTP_PSEUDO_AUTHORITY, (const char *)name)) {
|
||||
if((namelen == (sizeof(HTTP_PSEUDO_AUTHORITY)-1)) &&
|
||||
!strncmp(HTTP_PSEUDO_AUTHORITY, (const char *)name, namelen)) {
|
||||
/* pseudo headers are lower case */
|
||||
int rc = 0;
|
||||
char *check = curl_maprintf("%s:%d", cf->conn->host.name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue