Fix another bug (which doesn't affect the results, but may cause it to
authorDan Winship <danw@src.gnome.org>
Wed, 16 Jan 2008 21:28:04 +0000 (21:28 +0000)
committerDan Winship <danw@src.gnome.org>
Wed, 16 Jan 2008 21:28:04 +0000 (21:28 +0000)
* glib/gchecksum.c (md5_sum_update): Fix another bug (which
doesn't affect the results, but may cause it to read bad memory).

svn path=/trunk/; revision=6323

ChangeLog
glib/gchecksum.c

index c3b720e..3772b47 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-01-16  Dan Winship  <danw@gnome.org>
+
+       * glib/gchecksum.c (md5_sum_update): Fix another bug (which
+       doesn't affect the results, but may cause it to read bad memory).
+
 2008-01-15  Alexander Larsson  <alexl@redhat.com>
 
         * glib/gurifuncs.c:
index 8de9d12..c7108ad 100644 (file)
@@ -317,7 +317,7 @@ md5_sum_update (Md5sum       *md5,
       bit = MD5_DATASIZE - bit;
       if (length < bit)
         {
-          memcpy (p, data, bit);
+          memcpy (p, data, length);
           return;
         }