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

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

Issue 1861403002: Rename FX_SAFE_DWORD to FX_SAFE_UINT32 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 73ca71ef1a0ade19efa5fd954e3363ed22b2bb15..15af1ca5c7603264b291d6b87b144a62d5f03300 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp
@@ -1012,7 +1012,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, FX_BOOL bMainXRef) {
}
CFX_ArrayTemplate<uint32_t> WidthArray;
- FX_SAFE_DWORD dwAccWidth = 0;
+ FX_SAFE_UINT32 dwAccWidth = 0;
for (uint32_t i = 0; i < pArray->GetCount(); i++) {
WidthArray.Add(pArray->GetIntegerAt(i));
dwAccWidth += WidthArray[i];
@@ -1039,7 +1039,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, FX_BOOL bMainXRef) {
pdfium::base::checked_cast<uint32_t, int32_t>(startnum);
uint32_t count =
pdfium::base::checked_cast<uint32_t, int32_t>(arrIndex[i].second);
- FX_SAFE_DWORD dwCaculatedSize = segindex;
+ FX_SAFE_UINT32 dwCaculatedSize = segindex;
dwCaculatedSize += count;
dwCaculatedSize *= totalWidth;
if (!dwCaculatedSize.IsValid() ||
@@ -1048,7 +1048,7 @@ FX_BOOL CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, FX_BOOL bMainXRef) {
}
const uint8_t* segstart = pData + segindex * totalWidth;
- FX_SAFE_DWORD dwMaxObjNum = startnum;
+ FX_SAFE_UINT32 dwMaxObjNum = startnum;
dwMaxObjNum += count;
uint32_t dwV5Size = m_ObjectInfo.empty() ? 0 : GetLastObjNum() + 1;
if (!dwMaxObjNum.IsValid() || dwMaxObjNum.ValueOrDie() > dwV5Size)
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_hint_tables.cpp ('k') | core/fpdfapi/fpdf_render/fpdf_render_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698