From ede33dcfe984f5973e941aa75f3a0bf765e99a2c Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Wed, 10 Jul 2024 20:45:10 +1000 Subject: [PATCH] Remove reserved bytes check. Fix #2692 --- src/ImageSharp/Formats/Webp/WebpChunkParsingUtils.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/ImageSharp/Formats/Webp/WebpChunkParsingUtils.cs b/src/ImageSharp/Formats/Webp/WebpChunkParsingUtils.cs index 07f09d45ea..839798b4d7 100644 --- a/src/ImageSharp/Formats/Webp/WebpChunkParsingUtils.cs +++ b/src/ImageSharp/Formats/Webp/WebpChunkParsingUtils.cs @@ -218,10 +218,6 @@ public static WebpImageInfo ReadVp8XHeader(BufferedReadStream stream, Span // 3 reserved bytes should follow which are supposed to be zero. stream.Read(buffer, 0, 3); - if (buffer[0] != 0 || buffer[1] != 0 || buffer[2] != 0) - { - WebpThrowHelper.ThrowImageFormatException("reserved bytes should be zero"); - } // 3 bytes for the width. uint width = ReadUInt24LittleEndian(stream, buffer) + 1;