summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_PddProc.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-06-29 14:52:29 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-29 14:52:29 +0000
commit611da5146966980bca581e37fd85afbc2f6c763e (patch)
treeeae88ba09af08b14103381168e8199ef90ee5011 /core/fxcodec/jbig2/JBig2_PddProc.h
parent55f82fcc12972bdf405a28c3c428e11e889e8ce1 (diff)
downloadpdfium-611da5146966980bca581e37fd85afbc2f6c763e.tar.xz
Limit image size in CJBig2_PDDProc.
CJBig2_PDDProc internally creates a CJBig2_GRDProc to create an image. If the image is too big, then processing it can use up too much memory. BUG=chromium:857106 Change-Id: I06a9eaed6941be1cbb7481d21048e6a1681696b7 Reviewed-on: https://pdfium-review.googlesource.com/36490 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_PddProc.h')
-rw-r--r--core/fxcodec/jbig2/JBig2_PddProc.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/fxcodec/jbig2/JBig2_PddProc.h b/core/fxcodec/jbig2/JBig2_PddProc.h
index b9f4d81cf8..13590edb41 100644
--- a/core/fxcodec/jbig2/JBig2_PddProc.h
+++ b/core/fxcodec/jbig2/JBig2_PddProc.h
@@ -13,6 +13,7 @@
class CJBig2_ArithDecoder;
class CJBig2_BitStream;
+class CJBig2_GRDProc;
class CJBig2_PatternDict;
class PauseIndicatorIface;
struct JBig2ArithCtx;
@@ -26,12 +27,14 @@ class CJBig2_PDDProc {
std::unique_ptr<CJBig2_PatternDict> DecodeMMR(CJBig2_BitStream* pStream);
- public:
bool HDMMR;
uint8_t HDPW;
uint8_t HDPH;
uint32_t GRAYMAX;
uint8_t HDTEMPLATE;
+
+ private:
+ std::unique_ptr<CJBig2_GRDProc> CreateGRDProc();
};
#endif // CORE_FXCODEC_JBIG2_JBIG2_PDDPROC_H_