Repository navigation
Conversation
Codecov Report
@@ Coverage Diff @@
## master #964 +/- ##
==========================================
+ Coverage 89.65% 89.66% +0.01%
==========================================
Files 1097 1097
Lines 48542 48573 +31
Branches 3425 3425
==========================================
+ Hits 43520 43553 +33
+ Misses 4319 4317 -2
Partials 703 703
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #964 +/- ##
=========================================
+ Coverage 89.68% 89.7% +0.01%
=========================================
Files 1097 1097
Lines 48474 48506 +32
Branches 3420 3420
=========================================
+ Hits 43476 43510 +34
+ Misses 4295 4293 -2
Partials 703 703
Continue to review full report at Codecov.
|
|
Thanks! @101100 !! We'll have a good look at that asap. 👍 |
tocsoft
left a comment
There was a problem hiding this comment.
looks good. Thanks for the fix
|
Thanks for the quick merge! I tested this in my project with the nightly build |
…tion-in-fillregionprocessor Fix IndexOutOfRangeException in FillRegionProcessor
Prerequisites
Description
This is a fix for an issue that I have discovered as well as the reported issue #928. I have added two tests to illustrate the issue that fail on
masteras well as a possible fix.The issue arises due to this code:
ImageSharp/src/ImageSharp.Drawing/Processing/Processors/Drawing/FillRegionProcessor{TPixel}.cs
Lines 99 to 112 in aac8eae
If
pointsFoundis odd (such as 3) and equal to the size of the buffer, the loop will go up tobuffer.Length - 1, but that means thatbuffer[point + 1]will be out of bounds and cause an exception.My solution was to add a second condition to the loop:
point < buffer.Length - 1Unfortunately, I don't know enough about the algorithm to know if this will result in an incorrect result.