Browse Source

stream_extractor: archive: do not try to seek beyond entry size

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
pull/73/head
Filip Roséen 8 years ago
committed by Jean-Baptiste Kempf
parent
commit
5d3f5afc24
  1. 4
      modules/stream_extractor/archive.c

4
modules/stream_extractor/archive.c

@ -624,6 +624,10 @@ static int Seek( stream_extractor_t* p_extractor, uint64_t i_req )
if( !p_sys->b_seekable_source )
return VLC_EGENERIC;
if( archive_entry_size_is_set( p_sys->p_entry ) &&
(uint64_t)archive_entry_size( p_sys->p_entry ) < i_req )
return VLC_EGENERIC;
if( !p_sys->b_seekable_archive
|| archive_seek_data( p_sys->p_archive, i_req, SEEK_SET ) < 0 )
{

Loading…
Cancel
Save