From aa502a5160451e2bc4563d2f87a1c47b55eb099f Mon Sep 17 00:00:00 2001 From: blacktop Date: Wed, 10 Jul 2024 00:40:37 -0600 Subject: [PATCH] fix: GetCStrings for only sec.Name == "__cstring" --- file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file.go b/file.go index 0d23b66..50ea103 100644 --- a/file.go +++ b/file.go @@ -1649,7 +1649,7 @@ func (f *File) GetCStrings() ([]string, error) { var strs []string for _, sec := range f.Sections { - if sec.Flags.IsCstringLiterals() { + if sec.Flags.IsCstringLiterals() && sec.Name == "__cstring" { off, err := f.GetOffset(sec.Addr) if err != nil { return nil, fmt.Errorf("failed to get offset for %s.%s: %v", sec.Seg, sec.Name, err)