2013-01-31 Kai Tietz <ktietz@redhat.com>

PR other/543413
	* md5.c (md5_process_block):  Handle case that size_t is
	a wider-integer-scalar a 32-bit unsigned integer.

From-SVN: r195600
This commit is contained in:
Kai Tietz 2013-01-31 09:11:43 +01:00 committed by Kai Tietz
parent 2f0c9af59f
commit b1a2e8c606
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2013-01-31 Kai Tietz <ktietz@redhat.com>
PR other/543413
* md5.c (md5_process_block): Handle case that size_t is
a wider-integer-scalar a 32-bit unsigned integer.
2013-01-04 Ian Lance Taylor <iant@google.com> 2013-01-04 Ian Lance Taylor <iant@google.com>
PR other/54800 PR other/54800

View File

@ -293,8 +293,7 @@ md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
length of the file up to 2^64 bits. Here we only compute the length of the file up to 2^64 bits. Here we only compute the
number of bytes. Do a double word increment. */ number of bytes. Do a double word increment. */
ctx->total[0] += len; ctx->total[0] += len;
if (ctx->total[0] < len) ctx->total[1] += ((len >> 31) >> 1) + (ctx->total[0] < len);
++ctx->total[1];
/* Process all bytes in the buffer with 64 bytes in each round of /* Process all bytes in the buffer with 64 bytes in each round of
the loop. */ the loop. */