vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Wed Feb 20 17:21:44 2019 +0200| [3a34a20a6a796d8fb4c3bce2c92611fd0838fdd4] | committer: Rémi Denis-Courmont
url: fix NULL dereference on invalid URI encoding > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3a34a20a6a796d8fb4c3bce2c92611fd0838fdd4 --- src/text/url.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/text/url.c b/src/text/url.c index 3cfefb6aa1..cc83c16a68 100644 --- a/src/text/url.c +++ b/src/text/url.c @@ -512,7 +512,8 @@ static int vlc_UrlParseInner(vlc_url_t *restrict url, const char *str) if (next != NULL) *(next++) = '\0'; - url->psz_host = vlc_idna_to_ascii(vlc_uri_decode(cur)); + const char *host = vlc_uri_decode(cur); + url->psz_host = (host != NULL) ? vlc_idna_to_ascii(host) : NULL; } if (url->psz_host == NULL) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
