# HG changeset patch # User michael # Date 1080644321 0 # Node ID 9aabf1beeb4f924f0085d5e3c98012c56e9df352 # Parent f705b0777572b5c80fae6cc9d4a715e171d3e44d remote exploitable heap overflow fix by ("blexim" ) diff -r f705b0777572 -r 9aabf1beeb4f libmpdemux/http.c --- a/libmpdemux/http.c Tue Mar 30 01:05:51 2004 +0000 +++ b/libmpdemux/http.c Tue Mar 30 10:58:41 2004 +0000 @@ -175,7 +175,7 @@ if( http_hdr->method==NULL ) http_set_method( http_hdr, "GET"); if( http_hdr->uri==NULL ) http_set_uri( http_hdr, "/"); else { - uri = (char*)malloc(strlen(http_hdr->uri)*2); + uri = (char*)malloc((strlen(http_hdr->uri)*3) + 1); if( uri==NULL ) { mp_msg(MSGT_NETWORK,MSGL_ERR,"Memory allocation failed\n"); return NULL;