[vlc-commits] demux: subtitle: fix NULL deref on missing decoder
Francois Cartegnie
git at videolan.org
Tue Jan 24 16:49:44 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Jan 24 16:13:33 2017 +0100| [4cc3125377e80e2988f310762c0a50a0443feee1] | committer: Francois Cartegnie
demux: subtitle: fix NULL deref on missing decoder
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4cc3125377e80e2988f310762c0a50a0443feee1
---
modules/demux/subtitle.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index c2e7746..1d25cf1 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -598,8 +598,14 @@ static int Open ( vlc_object_t *p_this )
fmt.i_extra = strlen( p_sys->props.psz_header ) + 1;
fmt.p_extra = strdup( p_sys->props.psz_header );
}
+
p_sys->es = es_out_Add( p_demux->out, &fmt );
es_format_Clean( &fmt );
+ if( p_sys->es == NULL )
+ {
+ Close( p_this );
+ return VLC_EGENERIC;
+ }
return VLC_SUCCESS;
}
More information about the vlc-commits
mailing list