From 28d26ba51dac6565a796a4e2c68ad28f89af398f Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 29 Oct 2013 11:42:31 +0100 Subject: [PATCH 3/3] Fix clang warning dmap-md5.c:187:26: warning: 'memset' call operates on objects of type 'MD5_CTX' while the size is based on a different type 'MD5_CTX *' [-Wsizeof-pointer-memaccess] memset (ctx, 0, sizeof (ctx)); /* In case it's sensitive */ ~~~ ^~~ That should be "sizeof(*ctx)" instead. See https://bugzilla.redhat.com/show_bug.cgi?id=1023528 https://bugzilla.gnome.org/show_bug.cgi?id=711063 --- libdmapsharing/dmap-md5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libdmapsharing/dmap-md5.c b/libdmapsharing/dmap-md5.c index 4472472..c646d6c 100644 --- a/libdmapsharing/dmap-md5.c +++ b/libdmapsharing/dmap-md5.c @@ -176,7 +176,7 @@ DMAP_MD5Final (DMAPHashContext * ctx, unsigned char digest[16]) MD5Transform (ctx->buf, (guint32 *) ctx->in, ctx->version); byteReverse ((unsigned char *) ctx->buf, 4); memcpy (digest, ctx->buf, 16); - memset (ctx, 0, sizeof (ctx)); /* In case it's sensitive */ + memset (ctx, 0, sizeof (*ctx)); /* In case it's sensitive */ return; } -- 1.8.3.1