summaryrefslogtreecommitdiffstats
path: root/libavcodec/ass_split.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-11 02:31:04 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-11 02:31:31 +0100
commit97b1ba696baa1bb87415bad244533ac2beaf3568 (patch)
tree42f38ac3ce5f2eecef620664b32a66e66c4c6bf8 /libavcodec/ass_split.c
parent2c16bf2de07c68513072bf3cc96401d2c6291a3e (diff)
downloadffmpeg-streaming-97b1ba696baa1bb87415bad244533ac2beaf3568.zip
ffmpeg-streaming-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>
Diffstat (limited to 'libavcodec/ass_split.c')
-rw-r--r--libavcodec/ass_split.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c
index ddf4675..62c8db9 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 {
OpenPOWER on IntegriCloud