mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-18 12:56:56 +00:00
avcodec/g2meet: Fix potential overflow in tile dimensions check
Fixes CID1322351 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c447ab0e74
commit
71ec8e1ed6
@ -1448,7 +1448,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
c->tile_height = bytestream2_get_be32(&bc);
|
c->tile_height = bytestream2_get_be32(&bc);
|
||||||
if (c->tile_width <= 0 || c->tile_height <= 0 ||
|
if (c->tile_width <= 0 || c->tile_height <= 0 ||
|
||||||
((c->tile_width | c->tile_height) & 0xF) ||
|
((c->tile_width | c->tile_height) & 0xF) ||
|
||||||
c->tile_width * 4LL * c->tile_height >= INT_MAX
|
c->tile_width * (uint64_t)c->tile_height >= INT_MAX / 4
|
||||||
) {
|
) {
|
||||||
av_log(avctx, AV_LOG_ERROR,
|
av_log(avctx, AV_LOG_ERROR,
|
||||||
"Invalid tile dimensions %dx%d\n",
|
"Invalid tile dimensions %dx%d\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user