From 8a5efb00142ce6a5ebc103a2691f3ed35a358935 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 24 Apr 2013 14:11:49 +0200 Subject: [PATCH] sdp: NULL terminate the time array --- gst-libs/gst/sdp/gstsdpmessage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/sdp/gstsdpmessage.c b/gst-libs/gst/sdp/gstsdpmessage.c index 5e894a8370..08f1077d91 100644 --- a/gst-libs/gst/sdp/gstsdpmessage.c +++ b/gst-libs/gst/sdp/gstsdpmessage.c @@ -352,11 +352,11 @@ gst_sdp_message_copy (const GstSDPMessage * msg, GstSDPMessage ** copy) if (time->repeat != NULL) { guint j; - repeat = g_malloc0 (time->repeat->len * sizeof (gchar *)); - + repeat = g_malloc0 ((time->repeat->len + 1) * sizeof (gchar *)); for (j = 0; j < time->repeat->len; j++) { repeat[j] = g_array_index (time->repeat, char *, j); } + repeat[j] = NULL; } gst_sdp_message_add_time (cp, time->start, time->stop, repeat);