diff --git a/src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlDecoderCore.cs b/src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlDecoderCore.cs index 5578f4753..a057a270f 100644 --- a/src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlDecoderCore.cs +++ b/src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlDecoderCore.cs @@ -1505,7 +1505,7 @@ internal sealed class JxlDecoderCore : ImageDecoderCore, IDisposable { if (!this.gotCodestreamSignature) { - Span fileSignature = stackalloc byte[2]; + Span fileSignature = [0, 0]; stream.ReadExactly(fileSignature); if (fileSignature[0] != 0xFF || fileSignature[1] != JxlShared.CodestreamMarker)