[gst-cvs] gst-plugins-ugly: rtspreal: don' t construct config header with uninitialised bytes

Tim Mueller tpm at kemper.freedesktop.org
Sun Jan 31 05:04:55 PST 2010


Module: gst-plugins-ugly
Branch: master
Commit: efc5181d1374a61517d180768c35d48cc5ae9fb5
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=efc5181d1374a61517d180768c35d48cc5ae9fb5

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Sun Jan 31 13:03:33 2010 +0000

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 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gst/realmedia/rtspreal.c b/gst/realmedia/rtspreal.c
index 07f1df0..0b32b0c 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;
 





More information about the Gstreamer-commits mailing list