[vlc-devel] [PATCH 3/5] se/archive: add missing error-check in jump-callback

Filip Roséen filip at atch.se
Fri Mar 17 03:22:13 CET 2017


If we are unable to exit the current source-stream (be that for
whatever reason), we should not ignore the error as it /may/ have
fatal consequences down the road.

Better safe than sorry.
---
 modules/stream_extractor/archive.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
index bb553bb034..b49a88f6c7 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -118,7 +118,8 @@ static int libarchive_jump_cb( libarchive_t* p_arc, void* p_obj_current,
     libarchive_callback_t* p_current = (libarchive_callback_t*)p_obj_current;
     libarchive_callback_t* p_next    = (libarchive_callback_t*)p_obj_next;
 
-    libarchive_exit_cb( p_arc, p_current );
+    if( libarchive_exit_cb( p_arc, p_current ) )
+        return ARCHIVE_FATAL;
 
     if( p_next->p_source == NULL )
         p_next->p_source = vlc_stream_NewURL( p_next->p_sys->p_obj,
-- 
2.12.0


More information about the vlc-devel mailing list