From fb0654ec7a75d8cca64a88e3395ef5a7f5d4d835 Mon Sep 17 00:00:00 2001 From: "siddik.acil" Date: Fri, 7 Jan 2022 20:45:23 +0100 Subject: [PATCH] macho: fix FieldUTF8NullFixedLen for segname --- format/macho/macho.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/format/macho/macho.go b/format/macho/macho.go index e4d9ade3..43a788ee 100644 --- a/format/macho/macho.go +++ b/format/macho/macho.go @@ -250,7 +250,7 @@ func machoDecode(d *decode.D, in interface{}) interface{} { var nsects uint64 if archBits == 32 { d.FieldStruct("segment_command", func(d *decode.D) { - d.FieldUTF8NullFixedLen("segname", 16*8) + d.FieldUTF8NullFixedLen("segname", 16) d.FieldU32("vmaddr", scalar.Hex) d.FieldU32("vmsize") d.FieldU32("fileoff") @@ -262,7 +262,7 @@ func machoDecode(d *decode.D, in interface{}) interface{} { }) } else { d.FieldStruct("segment_command_64", func(d *decode.D) { - d.FieldUTF8NullFixedLen("segname", 16*8) + d.FieldUTF8NullFixedLen("segname", 16) d.FieldU64("vmaddr", scalar.Hex) d.FieldU64("vmsize") d.FieldU64("fileoff")