[vlc-commits] stream_extractor: archive: fail STREAM_GET_SIZE if size is unavailable

Filip Roséen git at videolan.org
Tue Jul 24 15:37:46 CEST 2018


vlc | branch: master | Filip Roséen <filip at atch.se> | Tue Jul 24 15:06:23 2018 +0200| [c734e7ffaf33ea6d75538280a981d65df70c5d5c] | committer: Jean-Baptiste Kempf

stream_extractor: archive: fail STREAM_GET_SIZE if size is unavailable

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/stream_extractor/archive.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
index 55c890c616..b51fd5b798 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -505,6 +505,9 @@ static int Control( stream_extractor_t* p_extractor, int i_query, va_list args )
             if( p_sys->p_entry == NULL )
                 return VLC_EGENERIC;
 
+            if( !archive_entry_size_is_set( p_sys->p_entry ) )
+                return VLC_EGENERIC;
+
             *va_arg( args, uint64_t* ) = archive_entry_size( p_sys->p_entry );
             break;
 



More information about the vlc-commits mailing list