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

Unified Diff: core/fpdfapi/parser/cpdf_hint_tables.cpp

Issue 2640143003: Update safe numerics package to get bitwise ops (Closed)
Patch Set: 0 is a perfectly fine value of zero 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
Index: core/fpdfapi/parser/cpdf_hint_tables.cpp
diff --git a/core/fpdfapi/parser/cpdf_hint_tables.cpp b/core/fpdfapi/parser/cpdf_hint_tables.cpp
index 5c0f2a7fbecf372aa07ed120e55387c7a95854ce..e000188e7d687c77759169b599c84dc46d3b9dec 100644
--- a/core/fpdfapi/parser/cpdf_hint_tables.cpp
+++ b/core/fpdfapi/parser/cpdf_hint_tables.cpp
@@ -257,7 +257,7 @@ bool CPDF_HintTables::ReadSharedObjHintTable(CFX_BitStream* hStream,
bit_offset *= 8;
if (!bit_offset.IsValid() || hStream->GetPos() > bit_offset.ValueOrDie())
return false;
- hStream->SkipBits(bit_offset.ValueOrDie() - hStream->GetPos());
+ hStream->SkipBits((bit_offset - hStream->GetPos()).ValueOrDie());
const uint32_t kHeaderSize = 192;
if (hStream->BitsRemaining() < kHeaderSize)

Powered by Google App Engine
This is Rietveld 408576698