diff options
author | dsinclair <dsinclair@chromium.org> | 2016-04-06 12:06:35 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-06 12:06:35 -0700 |
commit | 4e20094dbb2ea942734b8986fa9a60d2f3ccbb1b (patch) | |
tree | ebb642f2387b2a5ab4335944c549eccd1d142124 /core/fpdfapi/fpdf_parser/cpdf_parser.cpp | |
parent | 6fe7d2174a47107578da912299c93b4dfb9f2add (diff) | |
download | pdfium-4e20094dbb2ea942734b8986fa9a60d2f3ccbb1b.tar.xz |
Rename FX_SAFE_DWORD to FX_SAFE_UINT32
We removed the FX_DWORD typedef in favour of uint32_t. This CL cleans up the
FX_SAFE_DWORD naming to match.
BUG=pdfium:81, pdfium:470
Review URL: https://codereview.chromium.org/1861403002
Diffstat (limited to 'core/fpdfapi/fpdf_parser/cpdf_parser.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_parser/cpdf_parser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_parser.cpp b/core/fpdfapi/fpdf_parser/cpdf_parser.cpp index 73ca71ef1a..15af1ca5c7 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) |