[vlc-devel] [PATCH] se/archive: ExtractorOpen: add missing error-check in open
Filip Roséen
filip at atch.se
Fri Mar 17 12:28:33 CET 2017
The same check is correctly implemented in archive.c:DirectoryOpen,
but is missing from ExtractorOpen - resulting in a null-pointer
dereference if a libarchive handle fails to be created.
fixes: #18133
---
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 1e2f51fefd..b2bf4f9d47 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -702,6 +702,9 @@ static int ExtractorOpen( vlc_object_t* p_obj )
stream_extractor_t* p_extractor = (void*)p_obj;
private_sys_t* p_sys = CommonOpen( p_obj, p_extractor->source );
+ if( p_sys == NULL )
+ return VLC_EGENERIC;
+
if( archive_seek_subentry( p_sys, p_extractor->identifier ) )
{
CommonClose( p_sys );
--
2.12.0
More information about the vlc-devel
mailing list