Commits

lefessan  committed c84a799

PR#5662 : typo in md5.c when clearing sensitive data in context

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12642f963ae5c-01c2-4b8c-9fe0-0dff7051ff02

  • Participants
  • Parent commits 7313fa7

Comments (0)

Files changed (2)

 - PR#5327: (Windows) Unix.select blocks if same socket listed in first and
   third arguments
 - PR#5551: Avoid repeated lookups for missing cmi files
-
+- PR#5662: typo in md5.c
 
 OCaml 4.00.0:
 -------------

File byterun/md5.c

   CAMLreturn (res);
 }
 
-CAMLexport void caml_md5_block(unsigned char digest[16], 
+CAMLexport void caml_md5_block(unsigned char digest[16],
                                void * data, uintnat len)
 {
   struct MD5Context ctx;
     caml_MD5Transform(ctx->buf, (uint32 *) 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(*ctx));        /* In case it's sensitive */
 }
 
 /* The four core functions - F1 is optimized somewhat */