summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-03-30 10:58:41 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-03-30 10:58:41 +0000
commitec18d784f3d34beb9a6193fbb82436ee8ac22279 (patch)
tree77e592cc5ed052749fb17b27d32e28ec13a3ce3e /libmpdemux
parent886751550e9c055e9239e7fea1c9d9977e2b8a73 (diff)
downloadmpv-ec18d784f3d34beb9a6193fbb82436ee8ac22279.tar.bz2
mpv-ec18d784f3d34beb9a6193fbb82436ee8ac22279.tar.xz
remote exploitable heap overflow fix by ("blexim" <blexim at hush dot com>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12084 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmpdemux/http.c b/libmpdemux/http.c
index 8caad2ba84..2368592f1f 100644
--- a/libmpdemux/http.c
+++ b/libmpdemux/http.c
@@ -175,7 +175,7 @@ http_build_request( HTTP_header_t *http_hdr ) {
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;