浏览代码

Fix: Underflow of the buffer 'ctx'.

memset function should not receive sizeof of the pointer.
bank 11 年之前
父节点
当前提交
15bad30b2c
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 */
 }