changeset 10939:55c9903bd51c

simple fix for buffer overflow (remotely exploitable). feel free to commit a better fix if you don't like it.
author rfelker
date Thu, 25 Sep 2003 00:36:04 +0000
parents b1c983477841
children b99be2c88faf
files libmpdemux/asf_streaming.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/asf_streaming.c	Wed Sep 24 22:24:55 2003 +0000
+++ b/libmpdemux/asf_streaming.c	Thu Sep 25 00:36:04 2003 +0000
@@ -502,11 +502,11 @@
 			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 );