dashdemux: correctly handle an HTTP-XSDATE that is exactly the size of the date string
authorFlorin Apostol <florin.apostol@oregan.net>
Tue, 23 Feb 2016 10:49:40 +0000 (10:49 +0000)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 23 Feb 2016 12:41:35 +0000 (14:41 +0200)
commit72e46a447818a484e24caeecd33915612e4b0be8
treed22fe5924011cbb6204d3b23bb7a8420fa32fdbc
parentc0e930c26f2a64fe1cac3cfc1a641a8a564ac6fa
dashdemux: correctly handle an HTTP-XSDATE that is exactly the size of the date string

The code in the gst_dash_demux_parse_http_xsdate() was trying to
handle the case where the string is not null terminated by resizing
the buffer and appending a zero byte. This does not work if the buffer
is exactly the length of the string because the gst_buffer_resize()
function does not re-allocate the buffer, it just changes its size.

If a buffer is passed to gst_dash_demux_parse_http_xsdate() that is
exactly the length of the string, the function fails with an assert
failure in gst_buffer_resize().

https://bugzilla.gnome.org/show_bug.cgi?id=762148
ext/dash/gstdashdemux.c