From 0be087619a60b8bc6e2ed2e14c54f67aa8e963e4 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 30 Nov 2017 19:52:51 +0000 Subject: Fix GBK2K-H CMap usage. The data used is clearly a CID Range, but the code was interpreting it as single CID values. Change-Id: Ibb68f5ca2150d74b007a64ef5daa412fd542cecd Reviewed-on: https://pdfium-review.googlesource.com/17650 Reviewed-by: dsinclair Commit-Queue: Lei Zhang --- core/fpdfapi/cmaps/cmap_int.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/cmaps/cmap_int.h') diff --git a/core/fpdfapi/cmaps/cmap_int.h b/core/fpdfapi/cmaps/cmap_int.h index 464a3414e0..58b4a2cc07 100644 --- a/core/fpdfapi/cmaps/cmap_int.h +++ b/core/fpdfapi/cmaps/cmap_int.h @@ -10,16 +10,23 @@ #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" +struct FXCMAP_DWordCIDMap { + uint16_t m_HiWord; + uint16_t m_LoWordLow; + uint16_t m_LoWordHigh; + uint16_t m_CID; +}; + struct FXCMAP_CMap { enum MapType : uint8_t { None, Single, Range }; const char* m_Name; const uint16_t* m_pWordMap; - const uint16_t* m_pDWordMap; + const FXCMAP_DWordCIDMap* m_pDWordMap; uint16_t m_WordCount; uint16_t m_DWordCount; MapType m_WordMapType; - MapType m_DWordMapType; + MapType m_DWordMapType; // TODO(thestig): Remove. int8_t m_UseOffset; }; -- cgit v1.2.3