Mercurial > mplayer.hg
changeset 7909:6f76eebc0318
patch for crashes/memory corruptions in ASX playlist parser.
by Gregory Kovriga <gkovriga@techunix.technion.ac.il>
author | arpi |
---|---|
date | Fri, 25 Oct 2002 14:13:32 +0000 |
parents | dc96a3eb9fab |
children | 5a276890cec4 |
files | asxparser.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)