From ba07fc22bafb3909a4387300b3f44e88b129f0d7 Mon Sep 17 00:00:00 2001 From: Jason Heard Date: Sat, 10 Aug 2019 12:16:12 -0600 Subject: [PATCH] Add possible fix --- .../Processors/Drawing/FillRegionProcessor{TPixel}.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ImageSharp.Drawing/Processing/Processors/Drawing/FillRegionProcessor{TPixel}.cs b/src/ImageSharp.Drawing/Processing/Processors/Drawing/FillRegionProcessor{TPixel}.cs index d5778c865..f3196a8e8 100644 --- a/src/ImageSharp.Drawing/Processing/Processors/Drawing/FillRegionProcessor{TPixel}.cs +++ b/src/ImageSharp.Drawing/Processing/Processors/Drawing/FillRegionProcessor{TPixel}.cs @@ -105,7 +105,7 @@ namespace SixLabors.ImageSharp.Processing.Processors.Drawing QuickSort.Sort(buffer.Slice(0, pointsFound)); - for (int point = 0; point < pointsFound; point += 2) + for (int point = 0; point < pointsFound && point < buffer.Length - 1; point += 2) { // points will be paired up float scanStart = buffer[point] - minX;