Status: Unconfirmed
Owner: ----
Labels: Type-Bug Pri-2 OS-All Area-Misc
New issue 25629 by anders.a.petersen: Visited link hash uses only 4 bytes
of salt
http://code.google.com/p/chromium/issues/detail?id=25629
In the function VisitedLinkCommon::ComputeURLFingerprint(), only the first
4 bytes of the salt are used to compute the URL fingerprint. This problem
is present in Subversion revision 29883.
VisitedLinkCommon::Fingerprint VisitedLinkCommon::ComputeURLFingerprint(
const char* canonical_url,
size_t url_len,
const uint8 salt[LINK_SALT_LENGTH]) {
[...]
MD5Update(&ctx, salt, sizeof(salt));
[...]
}
When operating on an array which is a parameter to a function, the sizeof
operator returns the size of the pointer, not the size of the array. (See
<http://www.lysator.liu.se/c/c-faq/c-2.html#2-6>.)
The above line should be changed to the following:
MD5Update(&ctx, salt, LINK_SALT_LENGTH);
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---