mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-24 19:49:56 +08: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:

committed by
Matt Holt

parent
a19da07b72
commit
93bc1b72e3
@ -18,7 +18,7 @@
|
||||
package caddy
|
||||
|
||||
func FuzzParseNetworkAddress(data []byte) int {
|
||||
_, _, err := ParseNetworkAddress(string(data))
|
||||
_, err := ParseNetworkAddress(string(data))
|
||||
if err != nil {
|
||||
return 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user