summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosep Torra <n770galaxy@gmail.com>2015-11-15 17:16:29 -0800
committerJosep Torra <n770galaxy@gmail.com>2015-11-17 17:24:28 -0800
commit84b6743cf813651a6a6107ab3a875d2108cb6da7 (patch)
tree1819a1bd217aa76b5764bbeb0cc8bfc082376130
parentf8b9360dadf48d24a27011c56f06d784736155d7 (diff)
rtpgstdepay: Properly handle backward compat for event deserialization
Actual code is checking for a NULL terminator and a ';' terminator, for backward compat, in a chained way that cause all events being rejected. The proper condition is to reject the events when terminator isn't in ['\0', ';'] set. https://bugzilla.gnome.org/show_bug.cgi?id=758151
-rw-r--r--gst/rtp/gstrtpgstdepay.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gst/rtp/gstrtpgstdepay.c b/gst/rtp/gstrtpgstdepay.c
index aaea3d472..5c1476a62 100644
--- a/gst/rtp/gstrtpgstdepay.c
+++ b/gst/rtp/gstrtpgstdepay.c
@@ -282,10 +282,9 @@ read_event (GstRtpGSTDepay * rtpgstdepay, guint type,
if (length == 0)
goto invalid_buffer;
- if (map.data[offset + length - 1] != '\0')
- goto invalid_buffer;
/* backward compat, old payloader did not put 0-byte at the end */
- if (map.data[offset + length - 1] != ';')
+ if (map.data[offset + length - 1] != '\0'
+ && map.data[offset + length - 1] != ';')
goto invalid_buffer;
GST_DEBUG_OBJECT (rtpgstdepay, "parsing event %s", &map.data[offset]);