summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-11 14:08:53 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-11 14:08:53 +0000
commit26bcabf63a3693607ebfb72b9313511e583e382e (patch)
tree3b30afce6b388b00b03acae57b6a7581a6d0982e /libiberty
parente06aee53ac55de99e9d1b3fc7dc85540e4baadd1 (diff)
downloadgcc-26bcabf63a3693607ebfb72b9313511e583e382e.tar.gz
* md5.c (md5_process_bytes): Do not assume that memcpy will
provide a return value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@133107 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/md5.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 0153ff7e173..baa4bdabe22 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-11 Nick Clifton <nickc@redhat.com>
+
+ * md5.c (md5_process_bytes): Do not assume that memcpy will
+ provide a return value.
+
2008-02-19 Ben Elliston <bje@au.ibm.com>
PR other/12618
diff --git a/libiberty/md5.c b/libiberty/md5.c
index 83e0beb339f..9de9d88c22a 100644
--- a/libiberty/md5.c
+++ b/libiberty/md5.c
@@ -234,7 +234,8 @@ md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
if (UNALIGNED_P (buffer))
while (len > 64)
{
- md5_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx);
+ memcpy (ctx->buffer, buffer, 64);
+ md5_process_block (ctx->buffer, 64, ctx);
buffer = (const char *) buffer + 64;
len -= 64;
}