diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-10-17 16:10:17 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:18:37 +0200 |
commit | 56d122a6db2954b5a79c54634fe09b10b888871c (patch) | |
tree | d24af8da7e258b9085cee484016b0bd8c00136ab /stream/network.c | |
parent | f733870f3212e8513ed0dea2b9b4f26b59de5f24 (diff) | |
download | mpv-56d122a6db2954b5a79c54634fe09b10b888871c.tar.bz2 mpv-56d122a6db2954b5a79c54634fe09b10b888871c.tar.xz |
stream_network: Fix possible crash for invalid http_proxy URLs
Check for URLs like just "http_proxy://".
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32508 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/network.c')
-rw-r--r-- | stream/network.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stream/network.c b/stream/network.c index fc38effde4..cbf643a6f2 100644 --- a/stream/network.c +++ b/stream/network.c @@ -206,6 +206,10 @@ http_send_request( URL_t *url, off_t pos ) { 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; |