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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_parser.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_parser.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
index 305401525ce62ed28b27d020d5bb4a2e240a1a14..2002e3c9e7180ce1f02d35094b0683ec562413b7 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
@@ -186,7 +186,8 @@ CPDF_Parser::Error CPDF_Parser::StartParse(IFX_FileRead* pFileAccess) {
if (std::isdigit(ch))
m_FileVersion += FXSYS_toDecimalDigit(static_cast<FX_WCHAR>(ch));
- if (m_pSyntax->m_FileLen < m_pSyntax->m_HeaderOffset + 9)
+ if (static_cast<uint32_t>(m_pSyntax->m_FileLen) <
+ m_pSyntax->m_HeaderOffset + 9)
Tom Sepez 2016/03/30 23:28:28 Maybe m_HeaderOffset should be a FX_FILESIZE, too.
Wei Li 2016/03/31 01:39:09 Done.
return FORMAT_ERROR;
m_pSyntax->RestorePos(m_pSyntax->m_FileLen - m_pSyntax->m_HeaderOffset - 9);

Powered by Google App Engine
This is Rietveld 408576698