summaryrefslogtreecommitdiffstats
path: root/base/md5.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-13 18:21:04 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-13 18:21:04 +0000
commitc43e0b331af7e0b9c641fc4932cab99bc88ad829 (patch)
tree69fa48d18aa18069ffd8d42c382ec68275f7998e /base/md5.cc
parentecbc531e4678d3ad9c58942aa6b58ac2cb113d82 (diff)
downloadchromium_src-c43e0b331af7e0b9c641fc4932cab99bc88ad829.zip
chromium_src-c43e0b331af7e0b9c641fc4932cab99bc88ad829.tar.gz
chromium_src-c43e0b331af7e0b9c641fc4932cab99bc88ad829.tar.bz2
Fix two bugs found by a new clang warning I'm currently testing:
/Users/thakis/src/chrome-git/src/base/md5.cc:250:24: error: The sizeof expression in 'memset' has type 'struct Context *', the same type that the first argument has. The sizeof expression should probably have type 'struct Context' instead. [-Werror] memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ ^ 1 error generated. /Users/thakis/src/chrome-git/src/media/video/capture/fake_video_capture_device.cc:75:32: error: The sizeof expression in 'memset' has type 'unsigned char *', the same type that the first argument has. The sizeof expression should probably have type 'unsigned char' instead. [-Werror] memset(fake_frame_.get(), 0, sizeof(fake_frame_.get())); ^ 1 error generated. The warning is up for review here: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20110613/042719.html BUG=none TEST=none Review URL: http://codereview.chromium.org/7003140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/md5.cc')
-rw-r--r--base/md5.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/md5.cc b/base/md5.cc
index f85cf43..fdda2a4 100644
--- a/base/md5.cc
+++ b/base/md5.cc
@@ -247,7 +247,7 @@ void MD5Final(MD5Digest* digest, MD5Context *pCtx){
MD5Transform(ctx->buf, (uint32 *)ctx->in);
byteReverse((unsigned char *)ctx->buf, 4);
memcpy(digest->a, ctx->buf, 16);
- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}
std::string MD5DigestToBase16(const MD5Digest& digest){