Browse Source

Fix: Underflow of the buffer 'ctx'.

memset function should not receive sizeof of the pointer.
bank 11 years ago
parent
commit
15bad30b2c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Engine/source/core/util/md5.cpp

+ 1 - 1
Engine/source/core/util/md5.cpp

@@ -154,7 +154,7 @@ void MD5Final( unsigned char digest[16], MD5Context* ctx)
     MD5Transform(ctx->buf, (int *) ctx->in);
     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(MD5Context));        /* In case it's sensitive */
 }