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

Unified Diff: chrome/common/visitedlink_common.cc

Issue 7068017: Fix bug in history salt computation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/visitedlink_common.cc
diff --git a/chrome/common/visitedlink_common.cc b/chrome/common/visitedlink_common.cc
index 9cd1e848a090396f1b24c6be411d24bcf57c90c9..7b32c2fb20120ba469a42f714f6396bcf9cd96fc 100644
--- a/chrome/common/visitedlink_common.cc
+++ b/chrome/common/visitedlink_common.cc
@@ -81,7 +81,13 @@ VisitedLinkCommon::Fingerprint VisitedLinkCommon::ComputeURLFingerprint(
MD5Context ctx;
MD5Init(&ctx);
- MD5Update(&ctx, salt, sizeof(salt));
+
+ // This should really be
+ // MD5Update(&ctx, salt, sizeof(salt) * LINK_SALT_LENGTH);
+ // but fixing this requires regenerating local databases. 4 bytes of salt
+ // should be enough for everyone.
+ MD5Update(&ctx, salt, sizeof(uint8*));
brettw 2011/05/25 22:39:01 Hm, it sucks that this is different on 64 and 32 b
Nico 2011/05/25 22:41:56 Tell me what you want (and if it's 2, a three-sent
+
MD5Update(&ctx, canonical_url, url_len * sizeof(char));
MD5Digest digest;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698