-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e32e659
commit 33a1606
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
patches/components-safe_browsing-core-browser-db-v4_store.cc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/components/safe_browsing/core/browser/db/v4_store.cc b/components/safe_browsing/core/browser/db/v4_store.cc | ||
index 8e687f813c92e49927be6089b85b9348683ef2f2..0ce972859b2acddf72c69e14b980ec3072b0927e 100644 | ||
--- a/components/safe_browsing/core/browser/db/v4_store.cc | ||
+++ b/components/safe_browsing/core/browser/db/v4_store.cc | ||
@@ -1007,10 +1007,11 @@ bool V4Store::VerifyChecksum() { | ||
|
||
IteratorMap iterator_map; | ||
HashPrefixStr next_smallest_prefix; | ||
- InitializeIteratorMap(hash_prefix_map_->view(), &iterator_map); | ||
- CHECK_EQ(hash_prefix_map_->view().size(), iterator_map.size()); | ||
- bool has_unmerged = GetNextSmallestUnmergedPrefix( | ||
- hash_prefix_map_->view(), iterator_map, &next_smallest_prefix); | ||
+ HashPrefixMapView map_view = hash_prefix_map_->view(); | ||
+ InitializeIteratorMap(map_view, &iterator_map); | ||
+ CHECK_EQ(map_view.size(), iterator_map.size()); | ||
+ bool has_unmerged = GetNextSmallestUnmergedPrefix(map_view, iterator_map, | ||
+ &next_smallest_prefix); | ||
|
||
std::unique_ptr<crypto::SecureHash> checksum_ctx( | ||
crypto::SecureHash::Create(crypto::SecureHash::SHA256)); | ||
@@ -1025,8 +1026,8 @@ bool V4Store::VerifyChecksum() { | ||
next_smallest_prefix_size); | ||
|
||
// Find the next smallest unmerged element in the map. | ||
- has_unmerged = GetNextSmallestUnmergedPrefix( | ||
- hash_prefix_map_->view(), iterator_map, &next_smallest_prefix); | ||
+ has_unmerged = GetNextSmallestUnmergedPrefix(map_view, iterator_map, | ||
+ &next_smallest_prefix); | ||
} | ||
|
||
std::array<char, crypto::kSHA256Length> checksum; |