Fix null pointer with invalid argument values

This commit is contained in:
Vikram Rangnekar 2019-04-21 01:08:51 -04:00
parent 5edcf7b3a9
commit 7c37a1ef63

View File

@ -423,6 +423,10 @@ func (com *Compiler) compileArgNode(val *Node) (*Exp, error) {
st := util.NewStack()
var root *Exp
if val == nil || len(val.Children) == 0 {
return nil, errors.New("invalid argument value")
}
st.Push(&expT{nil, val.Children[0]})
for {