Commit ea5fa194 authored by Aurelien Jacobs's avatar Aurelien Jacobs Committed by Anton Khirnov

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

Signed-off-by: 's avatarAurelien Jacobs <aurel@gnuage.org>
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent ee81e76d
......@@ -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)) ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment