Skip to content

Commit 186e89d

Browse files
committed
validateProcessSpec: prevent SEGV when config is valid json, but invalid.
Signed-off-by: John Hwang <John.F.Hwang@gmail.com>
1 parent 7fc291f commit 186e89d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

utils_linux.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ func (r *runner) checkTerminal(config *specs.Process) error {
378378
}
379379

380380
func validateProcessSpec(spec *specs.Process) error {
381+
if spec == nil {
382+
return fmt.Errorf("process property must not be empty")
383+
}
381384
if spec.Cwd == "" {
382385
return errors.New("Cwd property must not be empty")
383386
}

0 commit comments

Comments
 (0)