1
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 07:33:46 +01:00

patch for crashes/memory corruptions in ASX playlist parser.

by Gregory Kovriga <gkovriga@techunix.technion.ac.il>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7910 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-10-25 14:13:32 +00:00
parent 305cadba3f
commit 6f3e7cffaa

View File

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