Avoid signed overflow in CPDF_ToUnicodeMap::StringToCode()
It was intended to be unsigned in the first place, and we're
perfectly happy with the overflow as long as it is no longer
undefined behaviour.
BUG=638489
Review-Url: https://codereview.chromium.org/2258053003
diff --git a/core/fpdfapi/fpdf_font/fpdf_font.cpp b/core/fpdfapi/fpdf_font/fpdf_font.cpp
index a14c43d..1cb67be 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -135,7 +135,7 @@
if (len == 0)
return 0;
- int result = 0;
+ uint32_t result = 0;
if (str[0] == '<') {
for (int i = 1; i < len && std::isxdigit(str[i]); ++i)
result = result * 16 + FXSYS_toHexDigit(str.CharAt(i));