Unbreak compilation
This commit is contained in:
parent
3cf5c1ab8e
commit
d2947cad75
|
@ -71,8 +71,8 @@ func parseODoHTargetConfigs(configs []byte) ([]ODoHTargetConfig, error) {
|
||||||
targets := make([]ODoHTargetConfig, 0)
|
targets := make([]ODoHTargetConfig, 0)
|
||||||
offset := 2
|
offset := 2
|
||||||
for {
|
for {
|
||||||
if offset+4 > len(configs) {
|
if offset+4 > len(configs) || len(targets) >= maxODoHConfigs {
|
||||||
return targets, nil
|
break
|
||||||
}
|
}
|
||||||
configVersion := binary.BigEndian.Uint16(configs[offset : offset+2])
|
configVersion := binary.BigEndian.Uint16(configs[offset : offset+2])
|
||||||
configLength := binary.BigEndian.Uint16(configs[offset+2 : offset+4])
|
configLength := binary.BigEndian.Uint16(configs[offset+2 : offset+4])
|
||||||
|
@ -83,10 +83,8 @@ func parseODoHTargetConfigs(configs []byte) ([]ODoHTargetConfig, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
offset = offset + int(configLength) + 4
|
offset = offset + int(configLength) + 4
|
||||||
if len(targets) >= maxODoHConfigs {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return targets, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type ODoHQuery struct {
|
type ODoHQuery struct {
|
||||||
|
|
Loading…
Reference in New Issue