Skip to content

Commit

Permalink
fix size computation for allocation may overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
justxuewei committed Aug 1, 2021
1 parent 3ee696b commit ef04f90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/router/tag/router_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func getRule(rawRule string) (*RouterRule, error) {

// parseTags use for flattening tags data to @addressToTagNames and @tagNameToAddresses
func (t *RouterRule) parseTags() {
t.AddressToTagNames = make(map[string][]string, 2*len(t.Tags))
t.AddressToTagNames = make(map[string][]string, len(t.Tags))
t.TagNameToAddresses = make(map[string][]string, len(t.Tags))
for _, tag := range t.Tags {
for _, address := range tag.Addresses {
Expand Down

0 comments on commit ef04f90

Please sign in to comment.