Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix clang warning:

libyasm/md5.c:166:31: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
        memset(ctx, 0, sizeof(ctx));    /* In case it's sensitive */
               ~~~            ^~~
  • Loading branch information...
commit a2cbb10ee1b90b73647667ac849c74d65761d412 1 parent 0e3fa2d
Pawel Worach authored September 24, 2011

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  libyasm/md5.c
2  libyasm/md5.c
@@ -162,7 +162,7 @@ yasm_md5_final(unsigned char digest[16], yasm_md5_context *ctx)
162 162
         putu32(ctx->buf[1], digest + 4);
163 163
         putu32(ctx->buf[2], digest + 8);
164 164
         putu32(ctx->buf[3], digest + 12);
165  
-        memset(ctx, 0, sizeof(ctx));    /* In case it's sensitive */
  165
+        memset(ctx, 0, sizeof(*ctx));    /* In case it's sensitive */
166 166
 }
167 167
 
168 168
 #ifndef ASM_MD5

0 notes on commit a2cbb10

Please sign in to comment.
Something went wrong with that request. Please try again.