summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/fpdfedittext.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfedittext.cpp b/fpdfsdk/fpdfedittext.cpp
index a14f54515f..2dde2e6624 100644
--- a/fpdfsdk/fpdfedittext.cpp
+++ b/fpdfsdk/fpdfedittext.cpp
@@ -317,6 +317,9 @@ void* LoadCompositeFont(CPDF_Document* pDoc,
std::map<uint32_t, uint32_t> to_unicode;
std::map<uint32_t, uint32_t> widths;
while (true) {
+ if (currentChar > 0x10FFFF)
+ break;
+
widths[glyphIndex] = pFont->GetGlyphWidth(glyphIndex);
to_unicode[glyphIndex] = currentChar;
currentChar =