From 92d9553943883912697ff79d6a36d56a38edf855 Mon Sep 17 00:00:00 2001 From: Zaheer Abbas Merali Date: Fri, 18 Feb 2005 13:58:36 +0000 Subject: [PATCH] libs/gst/dataprotocol/dataprotocol.c: Allocate the 1 byte more memory that was forgotten!!!!! Original commit message from CVS: 2005-02-18 Zaheer Abbas Merali * libs/gst/dataprotocol/dataprotocol.c: (gst_dp_dump_byte_array): Allocate the 1 byte more memory that was forgotten!!!!! --- ChangeLog | 6 ++++++ libs/gst/dataprotocol/dataprotocol.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 43adefcb3a..6221f27529 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-02-18 Zaheer Abbas Merali + + * 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 * docs/pwg/building-pads.xml: diff --git a/libs/gst/dataprotocol/dataprotocol.c b/libs/gst/dataprotocol/dataprotocol.c index 27512987ea..645d7574a7 100644 --- a/libs/gst/dataprotocol/dataprotocol.c +++ b/libs/gst/dataprotocol/dataprotocol.c @@ -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) {