summaryrefslogtreecommitdiff
path: root/core/fxcodec
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec')
-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 8a9c3efbc7..3e8967c265 100644
--- a/core/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/fxcodec/codec/fx_codec_fax.cpp
@@ -315,6 +315,8 @@ bool FaxG4GetRow(const uint8_t* src_buf,
}
if (a0 < 0)
++run_len1;
+ if (run_len1 < 0)
+ return false;
a1 = a0 + run_len1;
if (!a0color)
@@ -329,6 +331,8 @@ bool FaxG4GetRow(const uint8_t* src_buf,
break;
}
}
+ if (run_len2 < 0)
+ return false;
a2 = a1 + run_len2;
if (a0color)
FaxFillBits(dest_buf, columns, a1, a2);