Commit faf8963c authored by Steven Allen's avatar Steven Allen

fix zone validator

(bug caught by fuzzer)
parent 877fe653
......@@ -73,6 +73,9 @@ func ip6zoneBtS(b []byte) (string, error) {
}
func ip6zoneVal(b []byte) error {
if len(b) == 0 {
return fmt.Errorf("invalid length (should be > 0)")
}
// Not supported as this would break multiaddrs.
if bytes.IndexByte(b, '/') >= 0 {
return fmt.Errorf("IPv6 zone ID contains '/': %s", string(b))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment