mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
srtdec: make sure we don't write past the end of buffer
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org> Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
ee81e76db1
commit
ea5fa19427
@ -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)) ||
|
||||
|
Loading…
Reference in New Issue
Block a user