diff --git a/Library/DiscUtils.Ntfs/SecurityDescriptor.cs b/Library/DiscUtils.Ntfs/SecurityDescriptor.cs index 963fe5ef7..8d4175d46 100644 --- a/Library/DiscUtils.Ntfs/SecurityDescriptor.cs +++ b/Library/DiscUtils.Ntfs/SecurityDescriptor.cs @@ -76,7 +76,7 @@ public void WriteTo(Span buffer) } else { - EndianUtilities.WriteBytesLittleEndian(0, buffer.Slice(0x10)); + buffer.Slice(0x10).Clear(); } var sysAcl = Descriptor.SystemAcl; @@ -88,7 +88,7 @@ public void WriteTo(Span buffer) } else { - EndianUtilities.WriteBytesLittleEndian(0, buffer.Slice(0x0C)); + buffer.Slice(0x0C).Clear(); } EndianUtilities.WriteBytesLittleEndian(pos, buffer.Slice(0x04)); diff --git a/Library/DiscUtils.SquashFs/FragmentRecord.cs b/Library/DiscUtils.SquashFs/FragmentRecord.cs index b8f386e8a..31a67a047 100644 --- a/Library/DiscUtils.SquashFs/FragmentRecord.cs +++ b/Library/DiscUtils.SquashFs/FragmentRecord.cs @@ -48,6 +48,6 @@ public void WriteTo(Span buffer) { EndianUtilities.WriteBytesLittleEndian(StartBlock, buffer); EndianUtilities.WriteBytesLittleEndian(CompressedSize, buffer.Slice(8)); - EndianUtilities.WriteBytesLittleEndian(0, buffer.Slice(12)); + buffer.Slice(12).Clear(); } } \ No newline at end of file