diff options
author | weili <weili@chromium.org> | 2016-05-26 18:13:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-26 18:13:58 -0700 |
commit | 7aed76f53137a71491040c776ab2f8931e91061b (patch) | |
tree | 1ab0166c6161bcfbce931730c776fff0df0bbfba /core/fxcodec/jbig2/JBig2_Context.cpp | |
parent | 54ab2343c338f55735c37ed6751040791e1df1e2 (diff) | |
download | pdfium-7aed76f53137a71491040c776ab2f8931e91061b.tar.xz |
Fix a bug which may cause infinite loop
When the condition is "status == FXCODEC_STATUS_DECODE_TOBECONTINUE"
while |status| never gets updated in the loop, it would enter infinite
loop.
Also, since Start_decode_MMR() never returns
FXCODEC_STATUS_DECODE_TOBECONTINUE, there is no point to check on the
return value for that.
Review-Url: https://codereview.chromium.org/2013263002
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Context.cpp')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Context.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Context.cpp b/core/fxcodec/jbig2/JBig2_Context.cpp index 5a0b2c0d73..a0a411fbcf 100644 --- a/core/fxcodec/jbig2/JBig2_Context.cpp +++ b/core/fxcodec/jbig2/JBig2_Context.cpp @@ -1147,11 +1147,7 @@ int32_t CJBig2_Context::parseGenericRegion(CJBig2_Segment* pSegment, m_pStream->offset(2); } } else { - FXCODEC_STATUS status = m_pGRD->Start_decode_MMR(&pSegment->m_Result.im, - m_pStream.get(), pPause); - while (status == FXCODEC_STATUS_DECODE_TOBECONTINUE) { - m_pGRD->Continue_decode(pPause); - } + m_pGRD->Start_decode_MMR(&pSegment->m_Result.im, m_pStream.get(), pPause); if (!pSegment->m_Result.im) { m_pGRD.reset(); return JBIG2_ERROR_FATAL; |