From 52c1f8045c38bcce0229b2cc3c69b1cbe21eb629 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 18 Sep 2024 17:38:12 +0200 Subject: 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. --- pkg/vminfo/syscalls.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/vminfo/syscalls.go') 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 { -- cgit mrf-deployment