[BZ #14090] Fix md5/sha512 with large block sizes

Roland McGrath roland@hack.frob.com
Wed Aug 15 18:00:00 GMT 2012


> +// MD5 sum values of zero-filled blocks of specified sizes.

We don't use // comments.

> +static struct test_data_s

Add const.

> +  else
> +      __md5_process_bytes (buf, len, &ctx);

Indentation looks wrong.

> +  /* This test will not work with 32-bit size_t, so let it succeed there.  */
> +  if (sizeof (void *) == 4)
> +    return 0;
> +
> +  buf = mmap (0, CONST_10G, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);

Does this compile without warning on 32-bit machines?

> --- a/crypt/sha512.c
> +++ b/crypt/sha512.c

There's no test for the sha512 change.  I don't recall, was it determined
that there is no test that runs in a reasonable time?


Thanks,
Roland



More information about the Libc-alpha mailing list