summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-08 16:45:13 -0700
committerLei Zhang <thestig@chromium.org>2015-10-08 16:45:13 -0700
commita398ca611d1925182ff6a4e8b2b43c277c364dc0 (patch)
tree66cd2de771970aaa69950f3d64ba6bad08dc835f /core
parentd03ba8d1a5928e8f3f6bd7da063b53b0bc40abfd (diff)
downloadpdfium-a398ca611d1925182ff6a4e8b2b43c277c364dc0.tar.xz
Minimal revert from commit d03ba8d.
The values that were changed to size_t can go negative. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1400723002 .
Diffstat (limited to 'core')
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index 4d45d6f57e..392b918b40 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -1742,10 +1742,10 @@ const uint8_t* CPDF_CIDFont::GetCIDTransform(FX_WORD CID) const {
if (m_Charset != CIDSET_JAPAN1 || m_pFontFile)
return nullptr;
- size_t begin = 0;
- size_t end = FX_ArraySize(g_Japan1_VertCIDs) - 1;
+ int begin = 0;
+ int end = FX_ArraySize(g_Japan1_VertCIDs) - 1;
while (begin <= end) {
- size_t middle = (begin + end) / 2;
+ int middle = (begin + end) / 2;
FX_WORD middlecode = g_Japan1_VertCIDs[middle].CID;
if (middlecode > CID) {
end = middle - 1;