[vlc-commits] filter_chain: initialize chain->owner when the owner is NULL

Steve Lhomme git at videolan.org
Wed Feb 20 16:30:18 CET 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Feb 20 16:14:31 2019 +0100| [fbeff12af4f043fd853ae672c39129ccfda9915f] | committer: Steve Lhomme

filter_chain: initialize chain->owner when the owner is NULL

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

 src/misc/filter_chain.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index 1ad58b4031..ff6b2eefd2 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -82,6 +82,8 @@ static filter_chain_t *filter_chain_NewInner( const filter_owner_t *callbacks,
     chain->callbacks = *callbacks;
     if( owner != NULL )
         chain->owner = *owner;
+    else
+        memset(&chain->owner, 0, sizeof(chain->owner));
     chain->first = NULL;
     chain->last = NULL;
     es_format_Init( &chain->fmt_in, cat, 0 );



More information about the vlc-commits mailing list