[vlc-devel] [PATCH] stream_extractor/archive: prevent null-pointer dereference

Filip Roséen filip at atch.se
Thu Feb 23 14:54:27 CET 2017


Given that p_sys->p_obj is yet to be initialized with the value of the
obj, the implementation should use the latter (given that the former
will be zero-initialized, but nothing more).

--

This typo must have slipped by when I was refactoring the
implementation in order to address comments posted during the
review-process (and I should have caught it much earlier).

---
 modules/stream_extractor/archive.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/stream_extractor/archive.c b/modules/stream_extractor/archive.c
index 3d34d8ce76..684945982a 100644
--- a/modules/stream_extractor/archive.c
+++ b/modules/stream_extractor/archive.c
@@ -378,7 +378,7 @@ static int archive_seek_subentry( private_sys_t* p_sys, char const* psz_subentry
 static private_sys_t* setup( vlc_object_t* obj, stream_t* source )
 {
     private_sys_t* p_sys  = calloc( 1, sizeof( *p_sys ) );
-    char* psz_files = var_InheritString( p_sys->p_obj, "concat-list" );
+    char* psz_files = var_InheritString( obj, "concat-list" );
 
     if( unlikely( !p_sys ) )
         goto error;
-- 
2.11.1



More information about the vlc-devel mailing list