Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [patch libiberty]: Fix PR 543413
@ 2013-01-30 17:44 Kai Tietz
  2013-01-30 22:51 ` Ian Lance Taylor
  2013-01-31  9:11 ` Rainer Orth
  0 siblings, 2 replies; 4+ messages in thread
From: Kai Tietz @ 2013-01-30 17:44 UTC (permalink / raw)
  To: GCC Patches; +Cc: Binutils, gdb

Hi,

this patch fixes wrong handling of cases that bitness of size_t is
wider as 32-bit.

ChangeLog

2013-01-30  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.

Tested for x86_64-unknown-linux-gnu, i686-pc-cygwin, and
x86_64-w64-mingw32.  Ok for apply?

Regards,
Kai

Index: md5.c
===================================================================
--- md5.c	(Revision 195578)
+++ md5.c	(Arbeitskopie)
@@ -293,8 +293,7 @@ md5_process_block (const void *buffer, size_t len,
      length of the file up to 2^64 bits.  Here we only compute the
      number of bytes.  Do a double word increment.  */
   ctx->total[0] += len;
-  if (ctx->total[0] < len)
-    ++ctx->total[1];
+  ctx->total[1] += ((len >> 31) >> 1) + (ctx->total[0] < len);

   /* Process all bytes in the buffer with 64 bytes in each round of
      the loop.  */


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch libiberty]: Fix PR 543413
  2013-01-30 17:44 [patch libiberty]: Fix PR 543413 Kai Tietz
@ 2013-01-30 22:51 ` Ian Lance Taylor
  2013-01-31  9:11 ` Rainer Orth
  1 sibling, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2013-01-30 22:51 UTC (permalink / raw)
  To: Kai Tietz; +Cc: GCC Patches, Binutils, gdb

On Wed, Jan 30, 2013 at 9:44 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
>
> 2013-01-30  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.

This is OK.

Thanks.

Ian


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch libiberty]: Fix PR 543413
  2013-01-30 17:44 [patch libiberty]: Fix PR 543413 Kai Tietz
  2013-01-30 22:51 ` Ian Lance Taylor
@ 2013-01-31  9:11 ` Rainer Orth
  2013-01-31  9:14   ` Kai Tietz
  1 sibling, 1 reply; 4+ messages in thread
From: Rainer Orth @ 2013-01-31  9:11 UTC (permalink / raw)
  To: Kai Tietz; +Cc: GCC Patches, Binutils, gdb

Kai Tietz <ktietz70@googlemail.com> writes:

> this patch fixes wrong handling of cases that bitness of size_t is
> wider as 32-bit.
>
> ChangeLog
>
> 2013-01-30  Kai Tietz  <ktietz@redhat.com>
>
> 	PR other/543413

                 ^ this is clearly wrong (6 digits)

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

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [patch libiberty]: Fix PR 543413
  2013-01-31  9:11 ` Rainer Orth
@ 2013-01-31  9:14   ` Kai Tietz
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Tietz @ 2013-01-31  9:14 UTC (permalink / raw)
  To: Rainer Orth; +Cc: GCC Patches, Binutils, gdb

2013/1/31 Rainer Orth <ro@cebitec.uni-bielefeld.de>:
> Kai Tietz <ktietz70@googlemail.com> writes:
>
>> this patch fixes wrong handling of cases that bitness of size_t is
>> wider as 32-bit.
>>
>> ChangeLog
>>
>> 2013-01-30  Kai Tietz  <ktietz@redhat.com>
>>
>>       PR other/543413
>
>                  ^ this is clearly wrong (6 digits)
>
>>       * md5.c (md5_process_block):  Handle case that size_t is
>>       a wider-integer-scalar a 32-bit unsigned integer.
>
>         Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University

Thanks, your heads up is too late.  corrected this already.

Cheers,
Kai


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-31  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-30 17:44 [patch libiberty]: Fix PR 543413 Kai Tietz
2013-01-30 22:51 ` Ian Lance Taylor
2013-01-31  9:11 ` Rainer Orth
2013-01-31  9:14   ` Kai Tietz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox