From: Steve Lhomme Date: Sat, 3 Sep 2005 14:49:58 +0000 (+0000) Subject: * fix an uninitialized buffer use X-Git-Tag: 0.8.4~589 X-Git-Url: https://git.sesse.net/?p=vlc;a=commitdiff_plain;h=8fd5f21d4d207f6c395307891a82f08b863578de * fix an uninitialized buffer use --- diff --git a/modules/demux/mkv.cpp b/modules/demux/mkv.cpp index ad90dc6f13..c434322020 100644 --- a/modules/demux/mkv.cpp +++ b/modules/demux/mkv.cpp @@ -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;