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

Side by Side Diff: core/fpdfapi/font/font_int.h

Issue 2392103002: Avoid crashing on CPDF_ToUnicodeMap::Load by using ValueOrDefault() (Closed)
Patch Set: Created 4 years, 2 months 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 | « no previous file | core/fpdfapi/font/fpdf_font.cpp » ('j') | 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_FPDFAPI_FONT_FONT_INT_H_ 7 #ifndef CORE_FPDFAPI_FONT_FONT_INT_H_
8 #define CORE_FPDFAPI_FONT_FONT_INT_H_ 8 #define CORE_FPDFAPI_FONT_FONT_INT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 CFX_WideString Lookup(uint32_t charcode) const; 189 CFX_WideString Lookup(uint32_t charcode) const;
190 uint32_t ReverseLookup(FX_WCHAR unicode) const; 190 uint32_t ReverseLookup(FX_WCHAR unicode) const;
191 191
192 private: 192 private:
193 friend class fpdf_font_StringToCode_Test; 193 friend class fpdf_font_StringToCode_Test;
194 friend class fpdf_font_StringToWideString_Test; 194 friend class fpdf_font_StringToWideString_Test;
195 195
196 static uint32_t StringToCode(const CFX_ByteStringC& str); 196 static uint32_t StringToCode(const CFX_ByteStringC& str);
197 static CFX_WideString StringToWideString(const CFX_ByteStringC& str); 197 static CFX_WideString StringToWideString(const CFX_ByteStringC& str);
198 198
199 uint32_t GetUnicode();
200
199 std::map<uint32_t, uint32_t> m_Map; 201 std::map<uint32_t, uint32_t> m_Map;
200 CPDF_CID2UnicodeMap* m_pBaseMap; 202 CPDF_CID2UnicodeMap* m_pBaseMap;
201 CFX_WideTextBuf m_MultiCharBuf; 203 CFX_WideTextBuf m_MultiCharBuf;
202 }; 204 };
203 205
204 #endif // CORE_FPDFAPI_FONT_FONT_INT_H_ 206 #endif // CORE_FPDFAPI_FONT_FONT_INT_H_
OLDNEW
« no previous file with comments | « no previous file | core/fpdfapi/font/fpdf_font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698