mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-24 13:48:49 +08:00
Fix for crash in CCITT decoder. Resolves https://github.com/unidoc/unipdf/issues/314 (#315)
This commit is contained in:
parent
61ff51916a
commit
11f3a6e7a2
@ -412,6 +412,11 @@ func seekChangingElem(row []byte, currElem int) int {
|
||||
if currElem >= len(row) {
|
||||
return currElem
|
||||
}
|
||||
if currElem < -1 {
|
||||
// A current element of -1 means white color starting prior to first element (0).
|
||||
// Should not be able to go any further left than that.
|
||||
currElem = -1
|
||||
}
|
||||
|
||||
var color byte
|
||||
if currElem > -1 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user