Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20182e7 commit 25ab1a6Copy full SHA for 25ab1a6
libavcodec/dvdsubdec.c
@@ -548,7 +548,8 @@ static int append_to_cached_buf(AVCodecContext *avctx,
548
{
549
DVDSubContext *ctx = avctx->priv_data;
550
551
- if (ctx->buf_size >= sizeof(ctx->buf) - buf_size) {
+ av_assert0(buf_size >= 0 && ctx->buf_size <= sizeof(ctx->buf));
552
+ if (buf_size >= sizeof(ctx->buf) - ctx->buf_size) {
553
av_log(avctx, AV_LOG_WARNING, "Attempt to reconstruct "
554
"too large SPU packets aborted.\n");
555
ctx->buf_size = 0;
0 commit comments