diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2005-11-21 20:11:59 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2005-11-21 20:11:59 +0000 |
commit | 99b2663862b77c41d51c52102fec9ff4027894c4 (patch) | |
tree | c00ab3a723463b97b9c85a32badfea0209a84f0a /gst/rtsp | |
parent | 15c52996c2563871b3d3340c37f5a7e009cd01e2 (diff) |
gst/rtsp/rtspconnection.c: Apply patch from Sebastien Cote to fix #319184.
Original commit message from CVS:
* gst/rtsp/rtspconnection.c: (read_body):
Apply patch from Sebastien Cote to fix #319184.
Diffstat (limited to 'gst/rtsp')
-rw-r--r-- | gst/rtsp/rtspconnection.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/rtsp/rtspconnection.c b/gst/rtsp/rtspconnection.c index 11268e4a..81be1a85 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; |