From 15bad30b2cb314879212d1506f7e26d2fa406132 Mon Sep 17 00:00:00 2001 From: bank Date: Thu, 1 May 2014 12:55:01 +0400 Subject: [PATCH] Fix: Underflow of the buffer 'ctx'. memset function should not receive sizeof of the pointer. --- Engine/source/core/util/md5.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/source/core/util/md5.cpp b/Engine/source/core/util/md5.cpp index 8358d7655..41503cb86 100644 --- a/Engine/source/core/util/md5.cpp +++ b/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 */ }