fortify/print: skip nil filesystem entries
This fixes a panic when displaying configurations with nil filesystem entries. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
parent
85e5b097fd
commit
c70f0612ad
4
print.go
4
print.go
@ -93,6 +93,10 @@ func printShow(instance *state.State, config *fst.Config, short bool) {
|
||||
if !short && config.Confinement.Sandbox != nil && len(config.Confinement.Sandbox.Filesystem) > 0 {
|
||||
fmt.Fprintf(w, "Filesystem:\n")
|
||||
for _, f := range config.Confinement.Sandbox.Filesystem {
|
||||
if f == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
expr := new(strings.Builder)
|
||||
if f.Device {
|
||||
expr.WriteString(" d")
|
||||
|
Loading…
Reference in New Issue
Block a user