Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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 pwo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  libyasm/md5.c
2  libyasm/md5.c
View
@@ -162,7 +162,7 @@ yasm_md5_final(unsigned char digest[16], yasm_md5_context *ctx)
putu32(ctx->buf[1], digest + 4);
putu32(ctx->buf[2], digest + 8);
putu32(ctx->buf[3], digest + 12);
- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}
#ifndef ASM_MD5
Please sign in to comment.
Something went wrong with that request. Please try again.