mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use Stream extension to ensure read operations return the requested number of bytes (unless EOF arrives first).
This commit is contained in:
@@ -50,7 +50,7 @@ public sealed partial class DriDiskCopy
|
||||
|
||||
var buffer = new byte[Marshal.SizeOf<Footer>()];
|
||||
stream.Seek(-buffer.Length, SeekOrigin.End);
|
||||
stream.Read(buffer, 0, buffer.Length);
|
||||
stream.EnsureRead(buffer, 0, buffer.Length);
|
||||
|
||||
Footer tmpFooter = Marshal.ByteArrayToStructureLittleEndian<Footer>(buffer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user