| Index: core/fxcodec/codec/fx_codec_fax.cpp
|
| diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp
|
| index c0202829ee55312bdf3feb9c241aa4743156880c..b1f02c559b4398217e0da3bad30a8746d8e22e65 100644
|
| --- a/core/fxcodec/codec/fx_codec_fax.cpp
|
| +++ b/core/fxcodec/codec/fx_codec_fax.cpp
|
| @@ -337,10 +337,9 @@ FX_BOOL FaxG4GetRow(const uint8_t* src_buf,
|
| FaxFillBits(dest_buf, columns, a1, a2);
|
| }
|
| a0 = a2;
|
| - if (a0 < columns) {
|
| - continue;
|
| - }
|
| - return TRUE;
|
| + if (a0 < 0 && a0 >= columns)
|
| + return TRUE;
|
| + continue;
|
| } else {
|
| if (bitpos >= bitsize) {
|
| return FALSE;
|
| @@ -350,10 +349,9 @@ FX_BOOL FaxG4GetRow(const uint8_t* src_buf,
|
| if (!a0color) {
|
| FaxFillBits(dest_buf, columns, a0, b2);
|
| }
|
| - if (b2 >= columns) {
|
| - return TRUE;
|
| - }
|
| a0 = b2;
|
| + if (a0 < 0 || a0 >= columns)
|
| + return TRUE;
|
| continue;
|
| } else {
|
| if (bitpos >= bitsize) {
|
| @@ -398,10 +396,9 @@ FX_BOOL FaxG4GetRow(const uint8_t* src_buf,
|
| if (!a0color) {
|
| FaxFillBits(dest_buf, columns, a0, a1);
|
| }
|
| - if (a1 >= columns) {
|
| - return TRUE;
|
| - }
|
| a0 = a1;
|
| + if (a0 < 0 || a0 >= columns)
|
| + return TRUE;
|
| a0color = !a0color;
|
| }
|
| }
|
|
|