From 888402ecaf76c0ead448baaf52abbb3d48bb4ae9 Mon Sep 17 00:00:00 2001 From: Marco Carvalho Date: Sun, 2 Jun 2024 17:16:48 -0300 Subject: Avoid inexact read with 'Stream.Read' (#6847) --- src/Ryujinx.Graphics.Gpu/Shader/DiskCache/BinarySerializer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Ryujinx.Graphics.Gpu/Shader/DiskCache/BinarySerializer.cs') diff --git a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/BinarySerializer.cs b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/BinarySerializer.cs index ab4508f6..3837092c 100644 --- a/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/BinarySerializer.cs +++ b/src/Ryujinx.Graphics.Gpu/Shader/DiskCache/BinarySerializer.cs @@ -195,7 +195,7 @@ namespace Ryujinx.Graphics.Gpu.Shader.DiskCache switch (algorithm) { case CompressionAlgorithm.None: - stream.Read(data); + stream.ReadExactly(data); break; case CompressionAlgorithm.Deflate: stream = new DeflateStream(stream, CompressionMode.Decompress, true); -- cgit v1.2.3