From e6742fe88916d4f180898d1fdd16a974b8b9a1d7 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 24 Jul 2025 10:47:21 -0400 Subject: [PATCH] Fix missed AlignToBoundary case --- .../Deserializers/PortableExecutable.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/SabreTools.Serialization/Deserializers/PortableExecutable.cs b/SabreTools.Serialization/Deserializers/PortableExecutable.cs index ca9459c8..9ff12622 100644 --- a/SabreTools.Serialization/Deserializers/PortableExecutable.cs +++ b/SabreTools.Serialization/Deserializers/PortableExecutable.cs @@ -329,11 +329,7 @@ namespace SabreTools.Serialization.Deserializers baseRelocationTable.Add(baseRelocationBlock); // Align to the DWORD boundary if we're not at the end - if (data.Position < data.Length) - { - while (data.Position < data.Length && (data.Position % 4) != 0) - _ = data.ReadByte(); - } + data.AlignToBoundary(4); } return [.. baseRelocationTable];