From 569c2b06c47d269d961405fa652d45e51860d005 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Mon, 8 Oct 2018 11:38:02 -0700 Subject: Statfs Namelen should be NAME_MAX not PATH_MAX We accidentally set the wrong maximum. I've also added PATH_MAX and NAME_MAX to the linux abi package. PiperOrigin-RevId: 216221311 Change-Id: I44805fcf21508831809692184a0eba4cee469633 --- pkg/sentry/strace/strace.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/sentry/strace') diff --git a/pkg/sentry/strace/strace.go b/pkg/sentry/strace/strace.go index c99c33c33..f2a22aaa5 100644 --- a/pkg/sentry/strace/strace.go +++ b/pkg/sentry/strace/strace.go @@ -133,7 +133,7 @@ func dump(t *kernel.Task, addr usermem.Addr, size uint, maximumBlobSize uint) st } func path(t *kernel.Task, addr usermem.Addr) string { - path, err := t.CopyInString(addr, syscall.PathMax) + path, err := t.CopyInString(addr, linux.PATH_MAX) if err != nil { return fmt.Sprintf("%#x (error decoding path: %s)", addr, err) } -- cgit v1.2.3