[vlc-commits] demux: fix NULL deref on invalid redirection
Rémi Denis-Courmont
git at videolan.org
Thu Dec 31 15:28:38 CET 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Dec 31 16:28:18 2015 +0200| [86dff7e0bca5b618c792a397540564591e99c9ba] | committer: Rémi Denis-Courmont
demux: fix NULL deref on invalid redirection
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=86dff7e0bca5b618c792a397540564591e99c9ba
---
src/input/demux.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/input/demux.c b/src/input/demux.c
index 2ac7f74..98a3430 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -314,8 +314,12 @@ demux_t *input_DemuxNew( vlc_object_t *obj, const char *access_name,
if( stream->psz_url != NULL )
{
path = strstr( stream->psz_url, "://" );
- if( path != NULL )
- path += 3;
+ if( path == NULL )
+ {
+ stream_Delete( stream );
+ goto out;
+ }
+ path += 3;
}
demux = demux_NewAdvanced( obj, input, access_name, demux_name, path,
More information about the vlc-commits
mailing list