diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2018-11-22 19:09:28 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-11-22 19:30:04 +0100 |
| commit | 87815d9d3240b653160e1eb4e5a6931c0c3bd0d9 (patch) | |
| tree | cb5d55e803e88a5a878dd8cec546b1234d1af152 /tools | |
| parent | 97aa259615d7b50a18f9b32a99d6dad9ffbb5cab (diff) | |
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.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/syz-execprog/execprog.go | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
