Signed-off-by: Andreas Rheinhardt <[email protected]>
---
libavcodec/movtextenc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c
index 46109e0a5e..eecadaf503 100644
--- a/libavcodec/movtextenc.c
+++ b/libavcodec/movtextenc.c
@@ -667,6 +667,8 @@ static int mov_text_encode_frame(AVCodecContext *avctx,
unsigned char *buf,
}
}
+ if (s->byte_count > UINT16_MAX)
+ return AVERROR(ERANGE);
AV_WB16(buf, s->byte_count);
buf += 2;
--
2.32.0
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".