validateProcessSpec: prevent SEGV when config is valid json, but invalid.
@@ -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")
}
