summaryrefslogtreecommitdiff
path: root/core/fpdfapi/cmaps/cmap_int.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-11-30 19:52:51 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-30 19:52:51 +0000
commit0be087619a60b8bc6e2ed2e14c54f67aa8e963e4 (patch)
treef45e0823b466edb2966528ca09869265c6972539 /core/fpdfapi/cmaps/cmap_int.h
parentc25394f5d8622fbb6203e73843f84ec1739bfa0b (diff)
downloadpdfium-0be087619a60b8bc6e2ed2e14c54f67aa8e963e4.tar.xz
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 <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/cmaps/cmap_int.h')
-rw-r--r--core/fpdfapi/cmaps/cmap_int.h11
1 files changed, 9 insertions, 2 deletions
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;
};