[FFmpeg-cvslog] srtdec: make sure we don't write past the end of buffer

Aurelien Jacobs git at videolan.org
Fri May 13 04:46:01 CEST 2011


ffmpeg | branch: master | Aurelien Jacobs <aurel at gnuage.org> | Fri Mar 25 01:02:53 2011 +0100| [ea5fa19427fdaba332b908758f5779add7084bbe] | committer: Anton Khirnov

srtdec: make sure we don't write past the end of buffer

Signed-off-by: Aurelien Jacobs <aurel at gnuage.org>
Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavcodec/srtdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c
index da625aa..677c550 100644
--- a/libavcodec/srtdec.c
+++ b/libavcodec/srtdec.c
@@ -94,7 +94,7 @@ static const char *srt_to_ass(AVCodecContext *avctx, char *out, char *out_end,
             break;
         case '<':
             tag_close = in[1] == '/';
-            if (sscanf(in+tag_close+1, "%128[^>]>%n%c", buffer, &len,&c) >= 2) {
+            if (sscanf(in+tag_close+1, "%127[^>]>%n%c", buffer, &len,&c) >= 2) {
                 if ((param = strchr(buffer, ' ')))
                     *param++ = 0;
                 if ((!tag_close && sptr < FF_ARRAY_ELEMS(stack)) ||



More information about the ffmpeg-cvslog mailing list