diff options
author | Lei Zhang <thestig@chromium.org> | 2016-01-11 11:48:11 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-01-11 11:48:11 -0800 |
commit | 401cd2dbaaa10790077de2fd70e8101b0bdd0f36 (patch) | |
tree | 39dd3b945967346334583b4e5bbe5d8ebc608c58 /core/include | |
parent | a07804a3b16c10fa2011ef56d1dacefb7d21e4f6 (diff) | |
download | pdfium-401cd2dbaaa10790077de2fd70e8101b0bdd0f36.tar.xz |
Fix an uninitalized read in FPDFText_GetFontSize().
BUG=pdfium:346
R=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1578543002 .
Diffstat (limited to 'core/include')
-rw-r--r-- | core/include/fpdftext/fpdf_text.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/include/fpdftext/fpdf_text.h b/core/include/fpdftext/fpdf_text.h index 1b3ac0da00..a7fc6bdfbb 100644 --- a/core/include/fpdftext/fpdf_text.h +++ b/core/include/fpdftext/fpdf_text.h @@ -42,7 +42,8 @@ CFX_WideString PDF_GetFirstTextLine_Unicode(CPDF_Document* pDoc, #define CHAR_NORMAL 0 #define CHAR_GENERATED 1 #define CHAR_UNUNICODE 2 -typedef struct { + +struct FPDF_CHAR_INFO { FX_WCHAR m_Unicode; FX_WCHAR m_Charcode; int32_t m_Flag; @@ -52,7 +53,8 @@ typedef struct { CFX_FloatRect m_CharBox; CPDF_TextObject* m_pTextObj; CFX_Matrix m_Matrix; -} FPDF_CHAR_INFO; +}; + typedef CFX_ArrayTemplate<CFX_FloatRect> CFX_RectArray; #define FPDFTEXT_LRTB 0 #define FPDFTEXT_RLTB 1 @@ -92,7 +94,7 @@ class IPDF_TextPage { virtual int CountChars() const = 0; - virtual void GetCharInfo(int index, FPDF_CHAR_INFO& info) const = 0; + virtual void GetCharInfo(int index, FPDF_CHAR_INFO* info) const = 0; virtual void GetRectArray(int start, int nCount, |