summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamparser.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_streamparser.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp
index e9320cbc6f..aa1d227de0 100644
--- a/core/fpdfapi/page/cpdf_streamparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser.cpp
@@ -34,7 +34,7 @@ namespace {
const uint32_t kMaxNestedParsingLevel = 512;
const uint32_t kMaxWordBuffer = 256;
-const FX_STRSIZE kMaxStringLength = 32767;
+const size_t kMaxStringLength = 32767;
uint32_t DecodeAllScanlines(std::unique_ptr<CCodec_ScanlineDecoder> pDecoder,
uint8_t** dest_buf,
@@ -478,9 +478,9 @@ ByteString CPDF_StreamParser::ReadString() {
case 0:
if (ch == ')') {
if (parlevel == 0) {
- return ByteString(buf.str().c_str(),
- std::min(static_cast<FX_STRSIZE>(buf.tellp()),
- kMaxStringLength));
+ return ByteString(
+ buf.str().c_str(),
+ std::min(static_cast<size_t>(buf.tellp()), kMaxStringLength));
}
parlevel--;
buf << ')';
@@ -557,7 +557,7 @@ ByteString CPDF_StreamParser::ReadString() {
return ByteString(
buf.str().c_str(),
- std::min(static_cast<FX_STRSIZE>(buf.tellp()), kMaxStringLength));
+ std::min(static_cast<size_t>(buf.tellp()), kMaxStringLength));
}
ByteString CPDF_StreamParser::ReadHexString() {
@@ -590,7 +590,7 @@ ByteString CPDF_StreamParser::ReadHexString() {
return ByteString(
buf.str().c_str(),
- std::min(static_cast<FX_STRSIZE>(buf.tellp()), kMaxStringLength));
+ std::min(static_cast<size_t>(buf.tellp()), kMaxStringLength));
}
bool CPDF_StreamParser::PositionIsInBounds() const {