diff --git a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs index d92a0f591e..105c125852 100644 --- a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs +++ b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs @@ -280,7 +280,7 @@ namespace SixLabors.ImageSharp.Formats.Gif this.buffer[extensionSize + 2] = GifConstants.Terminator; - stream.Write(this.buffer, 0, 8); + stream.Write(this.buffer, 0, extensionSize + 3); } ///