[FFmpeg-cvslog] ass_split: fix out of array access

Michael Niedermayer git at videolan.org
Fri Jan 11 05:06:02 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 11 02:31:04 2013 +0100| [97b1ba696baa1bb87415bad244533ac2beaf3568] | committer: Michael Niedermayer

ass_split: fix out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97b1ba696baa1bb87415bad244533ac2beaf3568
---

 libavcodec/ass_split.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 {



More information about the ffmpeg-cvslog mailing list