diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-11 02:31:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-11 02:31:31 +0100 |
commit | 97b1ba696baa1bb87415bad244533ac2beaf3568 (patch) | |
tree | 42f38ac3ce5f2eecef620664b32a66e66c4c6bf8 | |
parent | 2c16bf2de07c68513072bf3cc96401d2c6291a3e (diff) | |
download | ffmpeg-97b1ba696baa1bb87415bad244533ac2beaf3568.tar.gz |
ass_split: fix out of array access
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/ass_split.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index ddf4675acd..62c8db91a5 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -250,7 +250,9 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf) ptr = struct_ptr + section->fields[order[i]].offset; convert_func[type](ptr, buf, len); } - buf = skip_space(buf + len + !last); + buf += len; + if (!last && *buf) buf++; + buf = skip_space(buf); } } } else { |