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:
rfelker 2003-09-25 00:36:04 +00:00
parent c3a0340aa8
commit aee0faef0a
1 changed files with 2 additions and 2 deletions

View File

@ -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 );