diff options
author | Lei Zhang <thestig@chromium.org> | 2015-11-24 11:47:24 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-11-24 11:47:24 -0800 |
commit | b599f192d635d97a2f41e8ffc9784e5291b11caf (patch) | |
tree | d324317c0c826757a715a0b45c61aa82a24f019c /core/src/fxcodec/jbig2/JBig2_Image.h | |
parent | 5259ef39ae47831a3533f475234b30f22a2ca849 (diff) | |
download | pdfium-b599f192d635d97a2f41e8ffc9784e5291b11caf.tar.xz |
Merge to XFA: Fix a NULL pointer crash in the CJBig2_Image copy constructor.
Also change the copy ctor to take a const ref.
BUG=560520
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1472113002 .
(cherry picked from commit d03bc01003ae2603dafdc07b901ffef0a509a2b9)
Review URL: https://codereview.chromium.org/1478473002 .
Diffstat (limited to 'core/src/fxcodec/jbig2/JBig2_Image.h')
-rw-r--r-- | core/src/fxcodec/jbig2/JBig2_Image.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/src/fxcodec/jbig2/JBig2_Image.h b/core/src/fxcodec/jbig2/JBig2_Image.h index e77da9059c..c47d275cf7 100644 --- a/core/src/fxcodec/jbig2/JBig2_Image.h +++ b/core/src/fxcodec/jbig2/JBig2_Image.h @@ -4,8 +4,8 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#ifndef _JBIG2_IMAGE_H_ -#define _JBIG2_IMAGE_H_ +#ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_IMAGE_H_ +#define CORE_SRC_FXCODEC_JBIG2_JBIG2_IMAGE_H_ #include "JBig2_Define.h" @@ -24,7 +24,7 @@ class CJBig2_Image { CJBig2_Image(int32_t w, int32_t h, int32_t stride, uint8_t* pBuf); - CJBig2_Image(CJBig2_Image& im); + CJBig2_Image(const CJBig2_Image& im); ~CJBig2_Image(); @@ -81,4 +81,5 @@ class CJBig2_Image { FX_BOOL m_bNeedFree; }; -#endif + +#endif // CORE_SRC_FXCODEC_JBIG2_JBIG2_IMAGE_H_ |