mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Fixing index out of range during exec of container
Signed-off-by: rajasec <rajasec79@gmail.com> Fixed review comments Signed-off-by: rajasec <rajasec79@gmail.com> updated the arguments check as per review comment Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
@@ -99,6 +99,10 @@ func execProcess(context *cli.Context) (int, error) {
|
||||
if err != nil {
|
||||
return -1, err
|
||||
}
|
||||
path := context.String("process")
|
||||
if path == "" && len(context.Args()) == 1 {
|
||||
return -1, fmt.Errorf("process args cannot be empty")
|
||||
}
|
||||
detach := context.Bool("detach")
|
||||
state, err := container.State()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user