Fixed new linting issue CWE-118

This commit is contained in:
Mike Farah 2023-08-28 17:39:46 +10:00
parent 596dda8c53
commit d18a5e3adc

View File

@ -66,8 +66,8 @@ func (dec *jsonDecoder) convertToYamlNode(data *orderedMap) (*yaml.Node, error)
}
var yamlMap = &yaml.Node{Kind: yaml.MappingNode, Tag: "!!map"}
for _, keyValuePair := range data.kv {
yamlValue, err := dec.convertToYamlNode(&keyValuePair.V)
for i, keyValuePair := range data.kv {
yamlValue, err := dec.convertToYamlNode(&data.kv[i].V)
if err != nil {
return nil, err
}