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

Issue 7068017: Fix bug in history salt computation (Closed)

Created:
9 years, 7 months ago by Nico
Modified:
9 years, 6 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Fix bug in history salt computation Since the salt is stored on disk, also increase the db version number. This will cause a rebuild of the history database. I added the following warning to clang to make sure we don't make this mistake anywhere else in the codebase: /Volumes/MacintoshHD2/src/chrome-git/src/chrome/browser/visitedlink/visitedlink_master.cc:968:30: error: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Werror,-Wsizeof-pointer-memaccess] memcpy(salt_, salt, sizeof(salt)); ~~~~ ^~~~ /Volumes/MacintoshHD2/src/chrome-git/src/chrome/browser/visitedlink/visitedlink_master.cc:964:17: note: declared here const uint8 salt[LINK_SALT_LENGTH]) ^ /Volumes/MacintoshHD2/src/chrome-git/src/chrome/common/visitedlink_common.cc:84:31: error: sizeof on array function parameter will return size of 'const uint8 *' (aka 'const unsigned char *') instead of 'const uint8 [8]' [-Werror,-Wsizeof-array-argument] MD5Update(&ctx, salt, sizeof(salt)); ^ /Volumes/MacintoshHD2/src/chrome-git/src/chrome/common/visitedlink_common.cc:79:17: note: declared here const uint8 salt[LINK_SALT_LENGTH]) { ^ BUG=25629 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89443

Patch Set 1 #

Total comments: 2

Patch Set 2 : . #

Patch Set 3 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -6 lines) Patch
M chrome/browser/visitedlink/visitedlink_master.cc View 1 2 4 chunks +6 lines, -5 lines 0 comments Download
M chrome/common/visitedlink_common.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (0 generated)
Nico
9 years, 7 months ago (2011-05-25 16:13:55 UTC) #1
brettw
http://codereview.chromium.org/7068017/diff/1/chrome/common/visitedlink_common.cc File chrome/common/visitedlink_common.cc (right): http://codereview.chromium.org/7068017/diff/1/chrome/common/visitedlink_common.cc#newcode89 chrome/common/visitedlink_common.cc:89: MD5Update(&ctx, salt, sizeof(uint8*)); Hm, it sucks that this is ...
9 years, 7 months ago (2011-05-25 22:39:01 UTC) #2
Nico
http://codereview.chromium.org/7068017/diff/1/chrome/common/visitedlink_common.cc File chrome/common/visitedlink_common.cc (right): http://codereview.chromium.org/7068017/diff/1/chrome/common/visitedlink_common.cc#newcode89 chrome/common/visitedlink_common.cc:89: MD5Update(&ctx, salt, sizeof(uint8*)); On 2011/05/25 22:39:01, brettw wrote: > ...
9 years, 7 months ago (2011-05-25 22:41:56 UTC) #3
brettw
On Wed, May 25, 2011 at 3:41 PM, <thakis@chromium.org> wrote: > > http://codereview.chromium.org/7068017/diff/1/chrome/common/visitedlink_common.cc > File ...
9 years, 7 months ago (2011-05-25 22:52:08 UTC) #4
brettw
On Wed, May 25, 2011 at 3:52 PM, Brett Wilson <brettw@chromium.org> wrote: > On Wed, ...
9 years, 7 months ago (2011-05-25 22:54:10 UTC) #5
Nico
I changed the CL to fix the bug instead, and bumped the DB version. I ...
9 years, 6 months ago (2011-06-16 21:39:14 UTC) #6
brettw
LGTM, good luck!
9 years, 6 months ago (2011-06-16 23:43:51 UTC) #7
commit-bot: I haz the power
9 years, 6 months ago (2011-06-17 02:40:56 UTC) #8
Change committed as 89443

Powered by Google App Engine
This is Rietveld 408576698