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

Unified Diff: fpdfsdk/src/fpdfview.cpp

Issue 445303002: Change '>=' back to '>' in extension.h due to bad fix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 4 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/src/fxcrt/extension.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfview.cpp
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index af24e71b941c4fef170cc81d39a449821d07ae73..23d44935b544743727e3f6dd80f2d7c4c391d791 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -299,14 +299,16 @@ public:
virtual FX_FILESIZE GetSize() {return m_size;}
virtual FX_BOOL ReadBlock(void* buffer, FX_FILESIZE offset, size_t size)
{
- if (offset < 0) {
- return FALSE;
- }
- FX_SAFE_FILESIZE newPos = base::checked_cast<FX_FILESIZE, size_t>(size);
- newPos += offset;
- if (!newPos.IsValid() || newPos.ValueOrDie() > (FX_DWORD)m_size) return FALSE;
- FXSYS_memcpy(buffer, m_pBuf+offset, size);
- return TRUE;
+ if (offset < 0) {
+ return FALSE;
+ }
+ FX_SAFE_FILESIZE newPos = base::checked_cast<FX_FILESIZE, size_t>(size);
+ newPos += offset;
+ if (!newPos.IsValid() || newPos.ValueOrDie() > (FX_DWORD)m_size) {
+ return FALSE;
+ }
+ FXSYS_memcpy(buffer, m_pBuf+offset, size);
+ return TRUE;
}
private:
FX_BYTE* m_pBuf;
« no previous file with comments | « core/src/fxcrt/extension.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698