From efc5181d1374a61517d180768c35d48cc5ae9fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 31 Jan 2010 13:03:33 +0000 Subject: [PATCH] rtspreal: don't construct config header with uninitialised bytes Turns out 4 + 4 + 2 + (4 * 2) is actually 18 and not 22. This avoids a presumably unintentional padding of uninitialised bytes at the end of the CONT tags chunk, which should be harmless but causes warnings in valgrind (see #608533 for a test URL). --- gst/realmedia/rtspreal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst/realmedia/rtspreal.c b/gst/realmedia/rtspreal.c index 07f1df06cd..0b32b0ccda 100644 --- a/gst/realmedia/rtspreal.c +++ b/gst/realmedia/rtspreal.c @@ -324,6 +324,7 @@ rtsp_ext_real_parse_sdp (GstRTSPExtension * ext, GstSDPMessage * sdp, ctx->duration = MAX (ctx->duration, intval); } + /* FIXME: use GstByteWriter to write the header */ /* PROP */ offset = 0; size = 50; @@ -352,7 +353,7 @@ rtsp_ext_real_parse_sdp (GstRTSPExtension * ext, GstSDPMessage * sdp, READ_BUFFER (sdp, "Comment", comment, comment_len); READ_BUFFER (sdp, "Copyright", copyright, copyright_len); - size = 22 + title_len + author_len + comment_len + copyright_len; + size = 18 + title_len + author_len + comment_len + copyright_len; ENSURE_SIZE (offset + size); datap = data + offset;