mirror of
https://github.com/mpv-player/mpv
synced 2025-02-03 05:31:34 +00:00
simple fix for buffer overflow (remotely exploitable). feel free to
commit a better fix if you don't like it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10940 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
c3a0340aa8
commit
aee0faef0a
@ -502,11 +502,11 @@ asf_http_request(streaming_ctrl_t *streaming_ctrl) {
|
||||
return NULL;
|
||||
}
|
||||
http_set_uri( http_hdr, server_url->url );
|
||||
sprintf( str, "Host: %s:%d", server_url->hostname, server_url->port );
|
||||
sprintf( str, "Host: %.220s:%d", server_url->hostname, server_url->port );
|
||||
url_free( server_url );
|
||||
} else {
|
||||
http_set_uri( http_hdr, url->file );
|
||||
sprintf( str, "Host: %s:%d", url->hostname, url->port );
|
||||
sprintf( str, "Host: %.220s:%d", url->hostname, url->port );
|
||||
}
|
||||
|
||||
http_set_field( http_hdr, str );
|
||||
|
Loading…
Reference in New Issue
Block a user