summaryrefslogtreecommitdiff
path: root/core/include
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2016-01-11 12:01:23 -0800
committerLei Zhang <thestig@chromium.org>2016-01-11 12:01:23 -0800
commit0f2ea02eb3d817993f3a5be0a5fa48f602e56483 (patch)
tree36acd17219bcbf6d6af2334b90719cbb1f789757 /core/include
parent375a86403b7fa8d17d7b142c270e2d8e33bb924f (diff)
downloadpdfium-0f2ea02eb3d817993f3a5be0a5fa48f602e56483.tar.xz
Merge to XFA: Fix an uninitalized read in FPDFText_GetFontSize().
BUG=pdfium:346 TBR=jun_fang@foxitsoftware.com Review URL: https://codereview.chromium.org/1578543002 . (cherry picked from commit 401cd2dbaaa10790077de2fd70e8101b0bdd0f36) Review URL: https://codereview.chromium.org/1578873002 .
Diffstat (limited to 'core/include')
-rw-r--r--core/include/fpdftext/fpdf_text.h8
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,