From d08333462160786ffcba66ca6c1b219c2868ea9c Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Fri, 16 Dec 2016 15:15:54 +0100 Subject: [PATCH] execution/oci: validate bundle path Signed-off-by: Antonio Murdaca --- execution/executors/oci/oci.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/execution/executors/oci/oci.go b/execution/executors/oci/oci.go index 685b9d5..1a01e64 100644 --- a/execution/executors/oci/oci.go +++ b/execution/executors/oci/oci.go @@ -37,6 +37,9 @@ type OCIRuntime struct { } func (r *OCIRuntime) Create(ctx context.Context, id string, o execution.CreateOpts) (container *execution.Container, err error) { + if o.Bundle == "" { + return nil, errors.New("bundle path cannot be an empty string") + } oio, err := newOIO(o.Stdin, o.Stdout, o.Stderr, o.Console) if err != nil { return nil, err