summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2010-01-31 13:03:33 (GMT)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2010-01-31 13:03:58 (GMT)
commitefc5181d1374a61517d180768c35d48cc5ae9fb5 (patch)
treec65596c9393e41c23bb4891b4f4e57cebd9dd71c
parentcd6b16734eeeaa7d73b6a62febac068459cf6882 (diff)
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).
-rw-r--r--gst/realmedia/rtspreal.c3
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;