summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfview.cpp')
-rw-r--r--fpdfsdk/fpdfview.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index 9142dc78c9..334c14cd45 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -192,8 +192,7 @@ bool CPDF_CustomAccess::ReadBlock(void* buffer,
if (offset < 0)
return false;
- FX_SAFE_FILESIZE newPos =
- pdfium::base::checked_cast<FX_FILESIZE, size_t>(size);
+ FX_SAFE_FILESIZE newPos = pdfium::base::checked_cast<FX_FILESIZE>(size);
newPos += offset;
if (!newPos.IsValid() ||
newPos.ValueOrDie() > static_cast<FX_FILESIZE>(m_FileAccess.m_FileLen)) {
@@ -388,8 +387,7 @@ class CMemFile final : public IFX_SeekableReadStream {
if (offset < 0) {
return false;
}
- FX_SAFE_FILESIZE newPos =
- pdfium::base::checked_cast<FX_FILESIZE, size_t>(size);
+ FX_SAFE_FILESIZE newPos = pdfium::base::checked_cast<FX_FILESIZE>(size);
newPos += offset;
if (!newPos.IsValid() || newPos.ValueOrDie() > m_size) {
return false;