validateProcessSpec: prevent SEGV when config is valid json, but invalid.
Signed-off-by: John Hwang <John.F.Hwang@gmail.com>
This commit is contained in:
parent
7fc291fd45
commit
5aa0601a59
|
@ -378,6 +378,9 @@ func (r *runner) checkTerminal(config *specs.Process) error {
|
|||
}
|
||||
|
||||
func validateProcessSpec(spec *specs.Process) error {
|
||||
if spec == nil {
|
||||
return errors.New("process property must not be empty")
|
||||
}
|
||||
if spec.Cwd == "" {
|
||||
return errors.New("Cwd property must not be empty")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue