diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-09-18 17:38:12 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-09-19 08:37:17 +0000 |
| commit | 52c1f8045c38bcce0229b2cc3c69b1cbe21eb629 (patch) | |
| tree | 6795b28e4d5cf644369433d5e1906fbf1bfe7e1b /pkg/vminfo/syscalls.go | |
| parent | 6d197301fe4a048a54f3203599963947b6563bd9 (diff) | |
sys/linux: add syz_create_resource
syz_create_resource allows to turn any value into a resource.
Improve binfmt descriptions using syz_create_resource:
we need to pass the same file name to write syscalls and execve.
Use syz_create_resource to improve binfmt descriptions.
Diffstat (limited to 'pkg/vminfo/syscalls.go')
| -rw-r--r-- | pkg/vminfo/syscalls.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/vminfo/syscalls.go b/pkg/vminfo/syscalls.go index 707ab6543..21ae6edd1 100644 --- a/pkg/vminfo/syscalls.go +++ b/pkg/vminfo/syscalls.go @@ -283,7 +283,7 @@ func extractStringConst(typ prog.Type, isAutomatic bool) (string, bool) { } ptr, ok := typ.(*prog.PtrType) if !ok { - panic("first open arg is not a pointer to string const") + return "", false } str, ok := ptr.Elem.(*prog.BufferType) if !ok || str.Kind != prog.BufferString || len(str.Values) == 0 { |
