]> git.sesse.net Git - vlc/commitdiff
* fix an uninitialized buffer use
authorSteve Lhomme <robux@videolan.org>
Sat, 3 Sep 2005 14:49:58 +0000 (14:49 +0000)
committerSteve Lhomme <robux@videolan.org>
Sat, 3 Sep 2005 14:49:58 +0000 (14:49 +0000)
modules/demux/mkv.cpp

index ad90dc6f136e7ec7fd433ce155412a1df09d7e22..c4343220202a1598b91ea69641c2256db7049439 100644 (file)
@@ -5031,15 +5031,18 @@ void demux_sys_t::JumpTo( virtual_segment_c & vsegment, chapter_item_c * p_chapt
 
 bool matroska_segment_c::CompareSegmentUIDs( const matroska_segment_c * p_item_a, const matroska_segment_c * p_item_b )
 {
+    if ( p_item_a == NULL || p_item_b == NULL )
+        return false;
+
     EbmlBinary * p_itema = (EbmlBinary *)(p_item_a->p_segment_uid);
-    if ( *p_itema == *p_item_b->p_prev_segment_uid )
+    if ( p_item_b->p_prev_segment_uid != NULL && *p_itema == *p_item_b->p_prev_segment_uid )
         return true;
 
     p_itema = (EbmlBinary *)(&p_item_a->p_next_segment_uid);
-    if ( *p_itema == *p_item_b->p_segment_uid )
+    if ( p_item_b->p_segment_uid != NULL && *p_itema == *p_item_b->p_segment_uid )
         return true;
 
-    if ( *p_itema == *p_item_b->p_prev_segment_uid )
+    if ( p_item_b->p_prev_segment_uid != NULL && *p_itema == *p_item_b->p_prev_segment_uid )
         return true;
 
     return false;