[vlc-commits] stream_extractor: archive: do not try to seek beyond entry size
Filip Roséen
git at videolan.org
Tue Jul 24 15:41:11 CEST 2018
vlc | branch: master | Filip Roséen <filip at atch.se> | Tue Jul 24 15:07:01 2018 +0200| [5d3f5afc24f19d4447ae5f0675e7aa6bc74a14f3] | committer: Jean-Baptiste Kempf
stream_extractor: archive: do not try to seek beyond entry size
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d3f5afc24f19d4447ae5f0675e7aa6bc74a14f3
---
modules/stream_extractor/archive.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
index b51fd5b798..0f2899916b 100644
--- a/modules/stream_extractor/archive.c
+++ b/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 )
{
More information about the vlc-commits
mailing list