[vlc-commits] hds: Fix potential null dereference
Hugo Beauzée-Luyssen
git at videolan.org
Mon Jun 26 13:27:05 CEST 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Jun 26 11:44:40 2017 +0200| [22435a9acf88f521a6c339d7500b998620e7d7ae] | committer: Hugo Beauzée-Luyssen
hds: Fix potential null dereference
CID #403185
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=22435a9acf88f521a6c339d7500b998620e7d7ae
---
modules/stream_filter/hds/hds.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index d07abecbf3..387951d86e 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -1642,6 +1642,12 @@ static int Open( vlc_object_t *p_this )
/* remove the last part of the url */
char *pos = strrchr( uri_without_query, '/');
+ if ( pos == NULL )
+ {
+ free( uri_without_query );
+ free( p_sys );
+ return VLC_EGENERIC;
+ }
*pos = '\0';
p_sys->base_url = uri_without_query;
More information about the vlc-commits
mailing list