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:
@@ -35,6 +35,7 @@ namespace Aaru.DiscImages;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.Helpers;
|
||||
|
||||
public sealed partial class BlindWrite4
|
||||
{
|
||||
@@ -48,7 +49,7 @@ public sealed partial class BlindWrite4
|
||||
return false;
|
||||
|
||||
var signature = new byte[19];
|
||||
stream.Read(signature, 0, 19);
|
||||
stream.EnsureRead(signature, 0, 19);
|
||||
|
||||
return _bw4Signature.SequenceEqual(signature);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user