Explorar o código

MD5Update(): memset() call corrected

valenok %!s(int64=14) %!d(string=hai) anos
pai
achega
3e48cebc13
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      mongoose.c

+ 1 - 1
mongoose.c

@@ -1983,7 +1983,7 @@ static void MD5Final(unsigned char digest[16], MD5_CTX *ctx) {
   MD5Transform(ctx->buf, (uint32_t *) ctx->in);
   byteReverse((unsigned char *) ctx->buf, 4);
   memcpy(digest, ctx->buf, 16);
-  memset((char *) ctx, 0, sizeof(ctx));
+  memset((char *) ctx, 0, sizeof(*ctx));
 }
 #endif // !HAVE_MD5