diff src/xs_support.c @ 937:b31d420b7fee

Actually clear the whole xs_md5state_t structure, instead of incorrectly using sizeof(ctx) whereas sizeof(*ctx) should have been used.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 Nov 2012 17:42:03 +0200
parents b928b8a9c5bf
children f8e1de328ac1
line wrap: on
line diff
--- a/src/xs_support.c	Mon Nov 19 17:41:02 2012 +0200
+++ b/src/xs_support.c	Mon Nov 19 17:42:03 2012 +0200
@@ -423,7 +423,7 @@
     xs_md5_transform(ctx->buf, (guint32 *) ctx->in);
     xs_md5_bytereverse((guint8 *) ctx->buf, 4);
     memcpy(digest, ctx->buf, 16);
-    memset(ctx, 0, sizeof(ctx));
+    memset(ctx, 0, sizeof(*ctx));
 }