From 0f06793c31d9c2e431337e67d2abf2d87745995e Mon Sep 17 00:00:00 2001 From: Artur Bulakaiev Date: Fri, 9 Jun 2023 17:13:08 +0300 Subject: [PATCH] Read exact 16 bytes in UUID load command --- ELFSharp/MachO/UUID.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ELFSharp/MachO/UUID.cs b/ELFSharp/MachO/UUID.cs index c22baa4..82eb6d8 100644 --- a/ELFSharp/MachO/UUID.cs +++ b/ELFSharp/MachO/UUID.cs @@ -19,7 +19,7 @@ internal UUID(SimpleEndianessAwareReader reader, Stream stream) : base(reader, s private Guid ReadUUID() { - var rawBytes = Reader.ReadBytes(16).TakeWhile(x => x != 0).ToArray(); + var rawBytes = Reader.ReadBytes(16).ToArray(); // Deal here with UUID endianess. Switch scheme is 4(r)-2(r)-2(r)-8(o) // where r is reverse, o is original order.