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 Imd
|
||||
return false;
|
||||
|
||||
var hdr = new byte[stream.Length < 256 ? stream.Length : 256];
|
||||
stream.Read(hdr, 0, hdr.Length);
|
||||
stream.EnsureRead(hdr, 0, hdr.Length);
|
||||
|
||||
string hdrStr = StringHandlers.CToString(hdr, Encoding.ASCII);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user