mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
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
This commit is contained in:
parent
f733870f32
commit
56d122a6db
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user