forked from security/hakurei
internal/outcome/shim: params check early
This is unreachable, but keeping it here as a failsafe until more test cases are added. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -147,6 +147,9 @@ func shimEntrypoint(k syscallDispatcher) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if stateParams.params.Ops == nil { // unreachable
|
||||
k.fatal("invalid container params")
|
||||
}
|
||||
|
||||
// shim exit outcomes
|
||||
var cancelContainer atomic.Pointer[context.CancelFunc]
|
||||
@@ -187,10 +190,6 @@ func shimEntrypoint(k syscallDispatcher) {
|
||||
}
|
||||
})
|
||||
|
||||
if stateParams.params.Ops == nil {
|
||||
k.fatal("invalid container params")
|
||||
}
|
||||
|
||||
// close setup socket
|
||||
if err := closeSetup(); err != nil {
|
||||
msg.Verbosef("cannot close setup pipe: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user