mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 15:53:17 +00:00
core: Use port ranges to avoid OOM with bad inputs (#2859)
* fix OOM issue caught by fuzzing * use ParsedAddress as the struct name for the result of ParseNetworkAddress * simplify code using the ParsedAddress type * minor cleanups
This commit is contained in:
parent
a19da07b72
commit
93bc1b72e3
8 changed files with 201 additions and 130 deletions
|
@ -18,7 +18,7 @@
|
|||
package caddy
|
||||
|
||||
func FuzzParseNetworkAddress(data []byte) int {
|
||||
_, _, err := ParseNetworkAddress(string(data))
|
||||
_, err := ParseNetworkAddress(string(data))
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue