Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1209)

Side by Side Diff: core/src/fxge/ge/text_int.h

Issue 1512873002: Fix heap-use-after-free in FT_Stream_ReleaseFrame (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/src/fxge/ge/fx_ge_fontmap.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_SRC_FXGE_GE_TEXT_INT_H_ 7 #ifndef CORE_SRC_FXGE_GE_TEXT_INT_H_
8 #define CORE_SRC_FXGE_GE_TEXT_INT_H_ 8 #define CORE_SRC_FXGE_GE_TEXT_INT_H_
9 9
10 #include "core/include/fxge/fx_font.h" 10 #include "core/include/fxge/fx_font.h"
(...skipping 11 matching lines...) Expand all
22 CFX_MapPtrToPtr m_GlyphMap; 22 CFX_MapPtrToPtr m_GlyphMap;
23 }; 23 };
24 class CTTFontDesc { 24 class CTTFontDesc {
25 public: 25 public:
26 CTTFontDesc() { 26 CTTFontDesc() {
27 m_Type = 0; 27 m_Type = 0;
28 m_pFontData = NULL; 28 m_pFontData = NULL;
29 m_RefCount = 0; 29 m_RefCount = 0;
30 } 30 }
31 ~CTTFontDesc(); 31 ~CTTFontDesc();
32 FX_BOOL ReleaseFace(FXFT_Face face); 32 // ret < 0, releaseface not appropriate for this object.
33 // ret == 0, object released
34 // ret > 0, object still alive, other referrers.
35 int ReleaseFace(FXFT_Face face);
33 int m_Type; 36 int m_Type;
34 union { 37 union {
35 struct { 38 struct {
36 FX_BOOL m_bItalic; 39 FX_BOOL m_bItalic;
37 FX_BOOL m_bBold; 40 FX_BOOL m_bBold;
38 FXFT_Face m_pFace; 41 FXFT_Face m_pFace;
39 } m_SingleFace; 42 } m_SingleFace;
40 struct { 43 struct {
41 FXFT_Face m_pFaces[16]; 44 FXFT_Face m_pFaces[16];
42 } m_TTCFace; 45 } m_TTCFace;
(...skipping 27 matching lines...) Expand all
70 const CFX_ByteString m_FilePath; 73 const CFX_ByteString m_FilePath;
71 const CFX_ByteString m_FaceName; 74 const CFX_ByteString m_FaceName;
72 const CFX_ByteString m_FontTables; 75 const CFX_ByteString m_FontTables;
73 const FX_DWORD m_FontOffset; 76 const FX_DWORD m_FontOffset;
74 const FX_DWORD m_FileSize; 77 const FX_DWORD m_FileSize;
75 FX_DWORD m_Styles; 78 FX_DWORD m_Styles;
76 FX_DWORD m_Charsets; 79 FX_DWORD m_Charsets;
77 }; 80 };
78 81
79 #endif // CORE_SRC_FXGE_GE_TEXT_INT_H_ 82 #endif // CORE_SRC_FXGE_GE_TEXT_INT_H_
OLDNEW
« no previous file with comments | « core/src/fxge/ge/fx_ge_fontmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698