mirror of
https://github.com/mikefarah/yq.git
synced 2026-06-29 16:41:45 +00:00
Fix out of range panic in yaml decoder
This commit is contained in:
parent
7d49d408ef
commit
ff40a023cc
@ -129,6 +129,8 @@ func (dec *yamlDecoder) Decode() (*CandidateNode, error) {
|
||||
return nil, err
|
||||
} else if err != nil {
|
||||
return nil, err
|
||||
} else if len(yamlNode.Content) == 0 {
|
||||
return nil, errors.New("yaml node has no content")
|
||||
}
|
||||
|
||||
candidateNode := CandidateNode{document: dec.documentIndex}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user