diff options
author | tsepez <tsepez@chromium.org> | 2017-01-23 14:36:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-23 14:36:20 -0800 |
commit | 4022f87eb8716155291543efaaf289e51d7cbf43 (patch) | |
tree | 28e2a3b99367932ee84a92b1f6c913245e62afb1 /core/fxcrt/fx_extension.cpp | |
parent | b76f49b36baffea2b2ecb90d67c7b6bb734e7bb9 (diff) | |
download | pdfium-4022f87eb8716155291543efaaf289e51d7cbf43.tar.xz |
Update safe numerics package to get bitwise ops
Fix callers conventions to avoid ambiguity.
Fix bad bounds check unmasked by change.
Directly include headers no longer pulled in by numerics itself.
Review-Url: https://codereview.chromium.org/2640143003
Diffstat (limited to 'core/fxcrt/fx_extension.cpp')
-rw-r--r-- | core/fxcrt/fx_extension.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fxcrt/fx_extension.cpp b/core/fxcrt/fx_extension.cpp index f1e2583b40..5b577f745c 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; |