diff --git a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs index 73af42afd4..77e1301cd3 100644 --- a/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/JpegDecoderCore.cs @@ -788,6 +788,11 @@ namespace SixLabors.ImageSharp.Formats.Jpeg } } } + else + { + // If the profile is unknown skip over the rest of it. + stream.Skip(remaining); + } } ///