mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-27 13:48:51 +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) {
|
if currElem >= len(row) {
|
||||||
return currElem
|
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
|
var color byte
|
||||||
if currElem > -1 {
|
if currElem > -1 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user