diff --git a/src/ImageSharp/Formats/WebP/WebPDecoderCore.cs b/src/ImageSharp/Formats/WebP/WebPDecoderCore.cs index 415c0a88d3..239755c1f7 100644 --- a/src/ImageSharp/Formats/WebP/WebPDecoderCore.cs +++ b/src/ImageSharp/Formats/WebP/WebPDecoderCore.cs @@ -321,8 +321,8 @@ namespace SixLabors.ImageSharp.Formats.WebP } // Check for VP8 magic bytes. - this.currentStream.Read(this.buffer, 0, 4); - if (!this.buffer.AsSpan(1).SequenceEqual(WebPConstants.Vp8MagicBytes)) + this.currentStream.Read(this.buffer, 0, 3); + if (!this.buffer.AsSpan().Slice(0, 3).SequenceEqual(WebPConstants.Vp8MagicBytes)) { WebPThrowHelper.ThrowImageFormatException("VP8 magic bytes not found"); }