ass_split: fix out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-11 02:31:04 +01:00
parent 2c16bf2de0
commit 97b1ba696b

View File

@ -250,7 +250,9 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf)
ptr = struct_ptr + section->fields[order[i]].offset; ptr = struct_ptr + section->fields[order[i]].offset;
convert_func[type](ptr, buf, len); convert_func[type](ptr, buf, len);
} }
buf = skip_space(buf + len + !last); buf += len;
if (!last && *buf) buf++;
buf = skip_space(buf);
} }
} }
} else { } else {