|
|
@ -484,13 +484,14 @@ namespace SixLabors.ImageSharp.Compression.Zlib |
|
|
|
|
|
|
|
|
int matchStrt = this.matchStart; |
|
|
int matchStrt = this.matchStart; |
|
|
int matchLength = this.matchLen; |
|
|
int matchLength = this.matchLen; |
|
|
matchLength = Math.Max(matchLength, DeflaterConstants.MIN_MATCH - 1); |
|
|
matchLength = Math.Max(matchLength, DeflaterConstants.MIN_MATCH - 1); |
|
|
this.matchLen = matchLength; |
|
|
this.matchLen = matchLength; |
|
|
|
|
|
|
|
|
if (scan > scanMax - matchLength) |
|
|
if (scan > scanMax - matchLength) |
|
|
{ |
|
|
{ |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int scanEndPosition = scan + matchLength; |
|
|
int scanEndPosition = scan + matchLength; |
|
|
|
|
|
|
|
|
byte* pinnedWindow = this.pinnedWindowPointer; |
|
|
byte* pinnedWindow = this.pinnedWindowPointer; |
|
|
|