summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-19 14:28:12 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-19 14:28:12 -0800
commitffc26c26f0ab004fbdb05195e1686d7f33983b06 (patch)
tree9bc8f16d1bc7dc32e924fb5c173a561c03eac3d9 /core/src/fpdfapi/fpdf_parser
parent11d33361e95d5ea61ee43e4261fa8f53aa372731 (diff)
downloadpdfium-ffc26c26f0ab004fbdb05195e1686d7f33983b06.tar.xz
Revert "Use safe arithmentic in CFX_BinaryBuf::ExpandBuf."
This reverts commit 78353d5dbc0b0c9b2d6946005439a51efa7d108c. Reason for revert Failed tests. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1719493002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index d52ef4fd34..735cd2b38a 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -1873,7 +1873,7 @@ CFX_ByteString CPDF_SyntaxParser::ReadHexString() {
if (!GetNextChar(ch))
return CFX_ByteString();
- CFX_ByteTextBuf buf;
+ CFX_BinaryBuf buf;
bool bFirst = true;
uint8_t code = 0;
while (1) {
@@ -1886,7 +1886,7 @@ CFX_ByteString CPDF_SyntaxParser::ReadHexString() {
code = val * 16;
} else {
code += val;
- buf.AppendByte(code);
+ buf.AppendByte((uint8_t)code);
}
bFirst = !bFirst;
}
@@ -1895,7 +1895,7 @@ CFX_ByteString CPDF_SyntaxParser::ReadHexString() {
break;
}
if (!bFirst)
- buf.AppendByte(code);
+ buf.AppendByte((uint8_t)code);
return buf.GetByteString();
}