From 6f3e7cffaa0af1a5b3254ec2b24423c5c601a3dc Mon Sep 17 00:00:00 2001 From: arpi Date: Fri, 25 Oct 2002 14:13:32 +0000 Subject: patch for crashes/memory corruptions in ASX playlist parser. by Gregory Kovriga git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7910 b3059339-0415-0410-9bf9-f77b7e298cf2 --- asxparser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'asxparser.c') diff --git a/asxparser.c b/asxparser.c index 7d46e34feb..cdc503b9d4 100644 --- a/asxparser.c +++ b/asxparser.c @@ -211,11 +211,11 @@ asx_parse_attribs(ASX_Parser_t* parser,char* buffer,char*** _attribs) { val[ptr2-ptr1] = '\0'; n_attrib++; - attribs = (char**)realloc(attribs,2*n_attrib*sizeof(char*)+1); + attribs = (char**)realloc(attribs,(2*n_attrib+1)*sizeof(char*)); attribs[n_attrib*2-2] = attrib; attribs[n_attrib*2-1] = val; - ptr1 = ptr2+2; + ptr1 = ptr2+1; } if(n_attrib > 0) -- cgit v1.2.3