Skip to content

Commit 8855bd1

Browse files
committed
checkpoint
1 parent a40c7ce commit 8855bd1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

celext/lib.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,11 @@ func (l lib) validateIPPrefix(p string, ver int64, strict bool) bool {
488488
}
489489

490490
func (l lib) isHostAndPort(val string, portRequired bool) bool {
491-
splitIdx := strings.LastIndexByte(val, ':')
491+
if len(val) == 0 {
492+
return false
493+
}
492494

495+
splitIdx := strings.LastIndexByte(val, ':')
493496
if val[0] == '[' { // ipv6
494497
end := strings.IndexByte(val, ']')
495498
switch end + 1 {

0 commit comments

Comments
 (0)