Mercurial > mplayer.hg
diff stream/network.c @ 32422:01115062cb22
Fix possible crash for invalid http_proxy URLs like just
"http_proxy://".
author | reimar |
---|---|
date | Sun, 17 Oct 2010 16:10:17 +0000 |
parents | 4614728cab25 |
children | b39155e98ac3 |
line wrap: on
line diff
--- a/stream/network.c Sun Oct 17 16:00:04 2010 +0000 +++ b/stream/network.c Sun Oct 17 16:10:17 2010 +0000 @@ -205,6 +205,10 @@ if( !strcasecmp(url->protocol, "http_proxy") ) { proxy = 1; server_url = url_new( (url->file)+1 ); + if (!server_url) { + mp_msg(MSGT_NETWORK, MSGL_ERR, "Invalid URL '%s' to proxify\n", url->file+1); + goto err_out; + } http_set_uri( http_hdr, server_url->url ); } else { server_url = url;