From 87815d9d3240b653160e1eb4e5a6931c0c3bd0d9 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Thu, 22 Nov 2018 19:09:28 +0100 Subject: ipc: fix ProgInfo usage We used to use len([]CallInfo) to check both, whether the slice is nil or whether its length is zero. Since ProgInfo is not a slice, we need a separate check for nil. --- tools/syz-execprog/execprog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/syz-execprog') diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go index 1ece85c17..310492ed0 100644 --- a/tools/syz-execprog/execprog.go +++ b/tools/syz-execprog/execprog.go @@ -148,7 +148,7 @@ func (ctx *Context) execute(pid int, env *ipc.Env, entry *prog.LogEntry) { log.Logf(0, "result: failed=%v hanged=%v err=%v\n\n%s", failed, hanged, err, output) } - if len(info.Calls) != 0 { + if info == nil || len(info.Calls) != 0 { ctx.printCallResults(info) if *flagHints { ctx.printHints(entry.P, info) -- cgit mrf-deployment