diff options
author | Nicolás Peña Moreno <npm@chromium.org> | 2018-01-15 21:47:45 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-15 21:47:45 +0000 |
commit | b36c7e1f84ea7402b7576d2a03a219d469735434 (patch) | |
tree | a505fc198c18a21f5483eb0c981fd10c71027e0c /core/fxcodec/jbig2/JBig2_ArithIntDecoder.h | |
parent | 6e22f26ac67ac8876e50f38f1dcf4dddb4c818a4 (diff) | |
download | pdfium-b36c7e1f84ea7402b7576d2a03a219d469735434.tar.xz |
Revert "Check for success of decodes to avoid infinite loops"
This reverts commit dca380ffe0571be4023b11b06b8aecad9934bb06.
Reason for revert: Causes missing text in a user's PDF
Original change's description:
> Check for success of decodes to avoid infinite loops
>
> Bug: 790693
> Change-Id: I9b1d87e024229d8b01f55ec554e2cc544db6ac06
> Reviewed-on: https://pdfium-review.googlesource.com/20230
> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
TBR=npm@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 790693
Change-Id: I886b14e120c34da757a96f8a1f9c6a081d8326b6
Reviewed-on: https://pdfium-review.googlesource.com/22950
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_ArithIntDecoder.h')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_ArithIntDecoder.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h index 2de42a09ee..fd9fa89f19 100644 --- a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h +++ b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h @@ -17,7 +17,8 @@ class CJBig2_ArithIntDecoder { CJBig2_ArithIntDecoder(); ~CJBig2_ArithIntDecoder(); - // Returns true on success, and false when an OOB condition occurs. + // Returns true on success, and false when an OOB condition occurs. Many + // callers can tolerate OOB and do not check the return value. bool decode(CJBig2_ArithDecoder* pArithDecoder, int* nResult); private: @@ -29,7 +30,7 @@ class CJBig2_ArithIaidDecoder { explicit CJBig2_ArithIaidDecoder(unsigned char SBSYMCODELENA); ~CJBig2_ArithIaidDecoder(); - bool decode(CJBig2_ArithDecoder* pArithDecoder, uint32_t* nResult); + void decode(CJBig2_ArithDecoder* pArithDecoder, uint32_t* nResult); private: std::vector<JBig2ArithCtx> m_IAID; |