Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp

Issue 1849443003: Re-enable all the windows warnings except 4267 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
index a4b85a34faa2fc3905c60707e56b89ea4052dafa..72addc1889ec87c718401af835770a7d3ac664fe 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp
@@ -722,7 +722,8 @@ FX_BOOL CPDF_DataAvail::IsDataAvail(FX_FILESIZE offset,
FX_SAFE_DWORD safeSize = pdfium::base::checked_cast<uint32_t>(offset);
Tom Sepez 2016/03/30 23:28:28 If this were a FX_SAFE_FILESIZE, we could avoid al
Wei Li 2016/03/31 01:39:08 Good idea, done.
safeSize += size;
safeSize += 512;
- if (!safeSize.IsValid() || safeSize.ValueOrDie() > m_dwFileLen)
+ if (!safeSize.IsValid() ||
+ safeSize.ValueOrDie() > static_cast<uint32_t>(m_dwFileLen))
size = m_dwFileLen - offset;
else
size += 512;

Powered by Google App Engine
This is Rietveld 408576698