mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Strace: handle null paths
PiperOrigin-RevId: 382603592
This commit is contained in:
committed by
gVisor bot
parent
590b8d3e99
commit
3d4a8824f8
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user