diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-11-12 10:38:04 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-11-12 10:39:28 +0200 |
commit | 68441fbc7505867098550cbf51f06be185ff2ac3 (patch) | |
tree | 5fad9139ab52b19f34dd286c1a209a626396b6cc | |
parent | bf3fb8d7a735370a8f5353255970bd1d82e3e901 (diff) | |
download | gstreamer-plugins-bad-68441fbc7505867098550cbf51f06be185ff2ac3.tar.gz |
hlsdemux: Fix NULL pointer dereference when checking if there is a next fragment
Thanks to Aleksandr <tumaleksandr@yandex.ua> for reporting and
suggesting the fix.
https://bugzilla.gnome.org/show_bug.cgi?id=774287
-rw-r--r-- | ext/hls/m3u8.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/hls/m3u8.c b/ext/hls/m3u8.c index bdb4acf88..2f22c13bc 100644 --- a/ext/hls/m3u8.c +++ b/ext/hls/m3u8.c @@ -711,7 +711,7 @@ gst_m3u8_has_next_fragment (GstM3U8 * m3u8, gboolean forward) cur = m3u8_find_next_fragment (m3u8, forward); } - have_next = (forward && cur->next) || (!forward && cur->prev); + have_next = cur && ((forward && cur->next) || (!forward && cur->prev)); GST_M3U8_UNLOCK (m3u8); |