mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
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
This commit is contained in:
parent
f8b9360dad
commit
84b6743cf8
1 changed files with 2 additions and 3 deletions
|
@ -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]);
|
||||
|
|
Loading…
Reference in a new issue