mirror of
https://github.com/curl/curl.git
synced 2026-07-25 02:37:18 +03:00
altsvc: reject bad port numbers
The existing code tried but did not properly reject alternative services using negative or too large port numbers. With this fix, the logic now also flushes the old entries immediately before adding a new one, making a following header with an illegal entry not flush the already stored entry. Report from the ongoing source code audit by Trail of Bits. Adjusted test 356 to verify. Closes #9607
This commit is contained in:
parent
eb33ccd533
commit
ac612dfeee
2 changed files with 16 additions and 11 deletions
|
|
@ -16,7 +16,9 @@ Content-Length: 6
|
|||
Connection: close
|
||||
Content-Type: text/html
|
||||
Funny-head: yesyes
|
||||
Alt-Svc: h1="nowhere.foo:-1"
|
||||
Alt-Svc: h1="nowhere.foo:81", un-kno22!wn=":82"
|
||||
Alt-Svc: h1="nowhere.foo:70000"
|
||||
|
||||
-foo-
|
||||
</data>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue