summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-23 19:19:52 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-23 19:19:52 +0000
commit95c67b3ec1bd5255c90b7ac3abab05912450a12e (patch)
tree3b90a2de59c5b05d91dfc46032151130c09a1858 /libiberty
parentb0e2b973e7f6600759981267fd69a5c00e56defc (diff)
downloadgcc-95c67b3ec1bd5255c90b7ac3abab05912450a12e.tar.gz
* md5.c (md5_process_bytes): Correct handling of unaligned
buffer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179128 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/md5.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 844b1ee4745..672d0ec4b96 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-23 Ian Lance Taylor <iant@google.com>
+
+ * md5.c (md5_process_bytes): Correct handling of unaligned
+ buffer.
+
2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* aclocal.m4: Include ../config/picflag.m4.
diff --git a/libiberty/md5.c b/libiberty/md5.c
index 11920e1b555..0db8fc8936f 100644
--- a/libiberty/md5.c
+++ b/libiberty/md5.c
@@ -1,6 +1,6 @@
/* md5.c - Functions to compute MD5 message digest of files or memory blocks
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2011 Free Software Foundation, Inc.
NOTE: This source is derived from an old version taken from the GNU C
Library (glibc).
@@ -245,9 +245,11 @@ md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
}
else
#endif
- md5_process_block (buffer, len & ~63, ctx);
- buffer = (const void *) ((const char *) buffer + (len & ~63));
- len &= 63;
+ {
+ md5_process_block (buffer, len & ~63, ctx);
+ buffer = (const void *) ((const char *) buffer + (len & ~63));
+ len &= 63;
+ }
}
/* Move remaining bytes in internal buffer. */