summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/fxcodec/codec/fx_codec_fax.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp
index 336c35b8d4..c121478c3c 100644
--- a/core/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/fxcodec/codec/fx_codec_fax.cpp
@@ -390,6 +390,10 @@ FX_BOOL FaxG4GetRow(const uint8_t* src_buf,
if (a1 >= columns)
return TRUE;
+ // The position of picture element must be monotonic increasing.
+ if (a0 >= a1)
+ return FALSE;
+
a0 = a1;
a0color = !a0color;
}