diff --git a/ChangeLog b/ChangeLog index 25cc382f81..8080c38a3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-21 Wim Taymans + + * gst/rtsp/rtspconnection.c: (read_body): + Apply patch from Sebastien Cote to fix #319184. + 2005-11-21 Thomas Vander Stichele * configure.ac: diff --git a/gst/rtsp/rtspconnection.c b/gst/rtsp/rtspconnection.c index 11268e4a91..81be1a8553 100644 --- a/gst/rtsp/rtspconnection.c +++ b/gst/rtsp/rtspconnection.c @@ -360,7 +360,8 @@ read_body (gint fd, glong content_length, RTSPMessage * msg) goto done; } - body = g_malloc (content_length); + body = g_malloc (content_length + 1); + body[content_length] = '\0'; bodyptr = body; to_read = content_length; while (to_read > 0) { @@ -375,7 +376,7 @@ read_body (gint fd, glong content_length, RTSPMessage * msg) } done: - rtsp_message_set_body (msg, (guint8 *) body, content_length); + rtsp_message_set_body (msg, (guint8 *) body, content_length + 1); return RTSP_OK;