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

Unified Diff: core/fxcrt/fx_extension.cpp

Issue 2640143003: Update safe numerics package to get bitwise ops (Closed)
Patch Set: Address reviewer comments Created 3 years, 11 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/fxcrt/fx_basic_util.cpp ('k') | core/fxge/ge/cfx_renderdevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/fx_extension.cpp
diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp
index f1e2583b40ea44c60a9d5f1781227b47d9fe1a13..5b577f745cab4554fde38529c19985a3d7628fe6 100644
--- a/core/fxcrt/fx_extension.cpp
+++ b/core/fxcrt/fx_extension.cpp
@@ -204,7 +204,7 @@ FX_FILESIZE CFX_MemoryStream::GetPosition() {
bool CFX_MemoryStream::ReadBlock(void* buffer,
FX_FILESIZE offset,
size_t size) {
- if (!buffer || !size)
+ if (!buffer || !size || offset < 0)
return false;
FX_SAFE_SIZE_T newPos = size;
« no previous file with comments | « core/fxcrt/fx_basic_util.cpp ('k') | core/fxge/ge/cfx_renderdevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698