[vlc-commits] demux: adaptative: fix read after free (cid #1346997)

Francois Cartegnie git at videolan.org
Thu Dec 31 15:29:43 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Dec 31 14:17:12 2015 +0100| [b796d9b8d0461f542bd760116d61f6b5ec843bf1] | committer: Francois Cartegnie

demux: adaptative: fix read after free (cid #1346997)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b796d9b8d0461f542bd760116d61f6b5ec843bf1
---

 modules/demux/adaptative/playlist/SegmentTimeline.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptative/playlist/SegmentTimeline.cpp b/modules/demux/adaptative/playlist/SegmentTimeline.cpp
index 8a02957..489b9fa 100644
--- a/modules/demux/adaptative/playlist/SegmentTimeline.cpp
+++ b/modules/demux/adaptative/playlist/SegmentTimeline.cpp
@@ -183,9 +183,9 @@ size_t SegmentTimeline::pruneBySequenceNumber(uint64_t number)
         }
         else
         {
-            delete el;
-            elements.pop_front();
             prunednow += el->r + 1;
+            elements.pop_front();
+            delete el;
         }
     }
 



More information about the vlc-commits mailing list