diff options
-rw-r--r-- | libavcodec/shorten.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 3bba10c398..08ea2178a4 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -131,8 +131,7 @@ static int allocate_buffers(ShortenContext *s) av_log(s->avctx, AV_LOG_ERROR, "nmean too large\n"); return AVERROR_INVALIDDATA; } - if (s->blocksize + s->nwrap >= UINT_MAX / sizeof(int32_t) || - s->blocksize + s->nwrap <= (unsigned)s->nwrap) { + if (s->blocksize + (uint64_t)s->nwrap >= UINT_MAX / sizeof(int32_t)) { av_log(s->avctx, AV_LOG_ERROR, "s->blocksize + s->nwrap too large\n"); return AVERROR_INVALIDDATA; |