summaryrefslogtreecommitdiff
path: root/core/include/fpdfapi/fpdf_pageobj.h
diff options
context:
space:
mode:
authorWei Li <weili@chromium.org>2016-02-12 18:21:21 -0800
committerWei Li <weili@chromium.org>2016-02-12 18:21:21 -0800
commit42a1bc02c0810c039afbcb62170c326f0e717320 (patch)
treea686d50142aaa5fbd19b0a4fde32f33377a74102 /core/include/fpdfapi/fpdf_pageobj.h
parentf5f1399f1af3c5869bf6857a125552d4834c19da (diff)
downloadpdfium-42a1bc02c0810c039afbcb62170c326f0e717320.tar.xz
Fix the way to access marked content.
When there is no dictionary for marked content, it potientially may cause crash. But it is not happening now since 1) we now check for the returned dict parameter 2) the alloc function in pdfium does zero initialization. BUG=pdfium:67 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1695633004 .
Diffstat (limited to 'core/include/fpdfapi/fpdf_pageobj.h')
-rw-r--r--core/include/fpdfapi/fpdf_pageobj.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/include/fpdfapi/fpdf_pageobj.h b/core/include/fpdfapi/fpdf_pageobj.h
index 7a3d390fed..42248c7dd1 100644
--- a/core/include/fpdfapi/fpdf_pageobj.h
+++ b/core/include/fpdfapi/fpdf_pageobj.h
@@ -265,7 +265,7 @@ class CPDF_GeneralState : public CFX_CountRef<CPDF_GeneralStateData> {
};
class CPDF_ContentMarkItem {
public:
- typedef enum { None, PropertiesDict, DirectDict, MCID } ParamType;
+ enum ParamType { None, PropertiesDict, DirectDict };
CPDF_ContentMarkItem();
@@ -277,13 +277,13 @@ class CPDF_ContentMarkItem {
inline ParamType GetParamType() const { return m_ParamType; }
- inline void* GetParam() const { return m_pParam; }
+ inline CPDF_Dictionary* GetParam() const { return m_pParam; }
inline FX_BOOL HasMCID() const;
inline void SetName(const CFX_ByteString& name) { m_MarkName = name; }
- inline void SetParam(ParamType type, void* param) {
+ inline void SetParam(ParamType type, CPDF_Dictionary* param) {
m_ParamType = type;
m_pParam = param;
}
@@ -293,7 +293,7 @@ class CPDF_ContentMarkItem {
ParamType m_ParamType;
- void* m_pParam;
+ CPDF_Dictionary* m_pParam;
};
class CPDF_ContentMarkData {
public: