summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-07-01 21:28:22 +0000
committergVisor bot <gvisor-bot@google.com>2021-07-01 21:28:22 +0000
commit13432b4ccf0782b1b039d661d9fa57f1d85b2c38 (patch)
treebb948f5657617ab3a0afa280ab313b334f51fa2f /pkg
parent9a66a5f3083af2d041ec1427ce67642be7aa6d9e (diff)
parent3d4a8824f8e7aafdf6c1d18822b7593fa2e3e6bb (diff)
Merge release-20210628.0-17-g3d4a8824f (automated)
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sentry/strace/strace.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/strace/strace.go b/pkg/sentry/strace/strace.go
index af7088847..3ea9c31dd 100644
--- a/pkg/sentry/strace/strace.go
+++ b/pkg/sentry/strace/strace.go
@@ -133,6 +133,9 @@ func dump(t *kernel.Task, addr hostarch.Addr, size uint, maximumBlobSize uint) s
}
func path(t *kernel.Task, addr hostarch.Addr) string {
+ if addr == 0 {
+ return "<null>"
+ }
path, err := t.CopyInString(addr, linux.PATH_MAX)
if err != nil {
return fmt.Sprintf("%#x (error decoding path: %s)", addr, err)