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

Side by Side Diff: core/include/fxge/fx_font.h

Issue 1830243003: Added bounds checking to GetNameFromTT to handle corrupt files. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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 | « core/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_INCLUDE_FXGE_FX_FONT_H_ 7 #ifndef CORE_INCLUDE_FXGE_FX_FONT_H_
8 #define CORE_INCLUDE_FXGE_FX_FONT_H_ 8 #define CORE_INCLUDE_FXGE_FX_FONT_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 534
535 class IFX_GSUBTable { 535 class IFX_GSUBTable {
536 public: 536 public:
537 static IFX_GSUBTable* Create(CFX_Font* pFont); 537 static IFX_GSUBTable* Create(CFX_Font* pFont);
538 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0; 538 virtual FX_BOOL GetVerticalGlyph(FX_DWORD glyphnum, FX_DWORD* vglyphnum) = 0;
539 539
540 protected: 540 protected:
541 virtual ~IFX_GSUBTable() {} 541 virtual ~IFX_GSUBTable() {}
542 }; 542 };
543 543
544 CFX_ByteString GetNameFromTT(const uint8_t* name_table, FX_DWORD name); 544 CFX_ByteString GetNameFromTT(const uint8_t* name_table,
545 FX_DWORD name_table_size,
546 FX_DWORD name);
545 547
546 int PDF_GetStandardFontName(CFX_ByteString* name); 548 int PDF_GetStandardFontName(CFX_ByteString* name);
547 549
548 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_ 550 #endif // CORE_INCLUDE_FXGE_FX_FONT_H_
OLDNEW
« no previous file with comments | « core/fxge/ge/fx_ge_fontmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698