# HG changeset patch # User arpi # Date 1035555212 0 # Node ID 6f76eebc0318a9b704ed0d3f057b4455bfd5f195 # Parent dc96a3eb9fabdda1ac60e117eafbd7403f5dc415 patch for crashes/memory corruptions in ASX playlist parser. by Gregory Kovriga diff -r dc96a3eb9fab -r 6f76eebc0318 asxparser.c --- a/asxparser.c Fri Oct 25 10:27:20 2002 +0000 +++ b/asxparser.c Fri Oct 25 14:13:32 2002 +0000 @@ -211,11 +211,11 @@ 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)