From 56d122a6db2954b5a79c54634fe09b10b888871c Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 17 Oct 2010 16:10:17 +0000 Subject: 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 --- stream/network.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stream') 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; -- cgit v1.2.3