libs/gst/dataprotocol/dataprotocol.c: Allocate the 1 byte more memory that was forgot...
authorZaheer Abbas Merali <zaheerabbas@merali.org>
Fri, 18 Feb 2005 13:58:36 +0000 (13:58 +0000)
committerZaheer Abbas Merali <zaheerabbas@merali.org>
Fri, 18 Feb 2005 13:58:36 +0000 (13:58 +0000)
Original commit message from CVS:
2005-02-18  Zaheer Abbas Merali  <zaheerabbas at merali dot org>

* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_dump_byte_array):
Allocate the 1 byte more memory that was forgotten!!!!!

ChangeLog
libs/gst/dataprotocol/dataprotocol.c

index 43adefc..6221f27 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-02-18  Zaheer Abbas Merali  <zaheerabbas at merali dot org>
+
+       * libs/gst/dataprotocol/dataprotocol.c: (gst_dp_dump_byte_array):
+       Allocate the 1 byte more memory that was forgotten!!!!!
+       fixes memory corruption on 64bit platforms
+
 2005-02-15  Stefan Kost  <ensonic@users.sf.net>
 
        * docs/pwg/building-pads.xml:
index 2751298..645d757 100644 (file)
@@ -83,7 +83,7 @@ gst_dp_dump_byte_array (guint8 * array, guint length)
 {
   int i;
   int n = 8;                    /* number of bytes per line */
-  gchar *line = g_malloc (3 * n);
+  gchar *line = g_malloc (3 * n + 1);
 
   GST_LOG ("dumping byte array of length %d", length);
   for (i = 0; i < length; ++i) {