commit | 962e4bff2fa741f0a8efc06fb84d55111bcc11b7 | [log] [tgz] |
---|---|---|
author | Lei Zhang <thestig@chromium.org> | Tue Aug 09 05:37:05 2022 +0000 |
committer | Pdfium LUCI CQ <pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Aug 09 05:37:05 2022 +0000 |
tree | 714ba6ae3423fdfda7355bda60fd05e5545c6a3d | |
parent | eb475a08801d782ddec123e015b05748d77f93ea [diff] |
Cast more consistently in CPDF_Stream. This is a follow-up to https://pdfium-review.googlesource.com/91150, which widened `m_dwSize` to a size_t. Change-Id: I6e750055ef0fad1c47161d94b369e2330760ca78 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/96210 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/parser/cpdf_stream.cpp b/core/fpdfapi/parser/cpdf_stream.cpp index f240f25..3257ba4 100644 --- a/core/fpdfapi/parser/cpdf_stream.cpp +++ b/core/fpdfapi/parser/cpdf_stream.cpp
@@ -93,8 +93,9 @@ m_pDataBuf.reset(); m_pFile = std::move(pFile); m_pDict = std::move(pDict); - m_dwSize = pdfium::base::checked_cast<uint32_t>(m_pFile->GetSize()); - m_pDict->SetNewFor<CPDF_Number>("Length", static_cast<int>(m_dwSize)); + m_dwSize = pdfium::base::checked_cast<size_t>(m_pFile->GetSize()); + m_pDict->SetNewFor<CPDF_Number>("Length", + pdfium::base::checked_cast<int>(m_dwSize)); } RetainPtr<CPDF_Object> CPDF_Stream::Clone() const {