]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/g2meet.c
Merge commit 'e336c51e6ffcdb93fbcf3c6153d378400608526b'
[ffmpeg] / libavcodec / g2meet.c
index b1457b7f9798bde2b058a4f395ff5376679517ad..ba83c673373dbffc55dc411c75c76d02ce7adb94 100644 (file)
@@ -1448,7 +1448,7 @@ static int g2m_decode_frame(AVCodecContext *avctx, void *data,
             c->tile_height = bytestream2_get_be32(&bc);
             if (c->tile_width <= 0 || c->tile_height <= 0 ||
                 ((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,
                        "Invalid tile dimensions %dx%d\n",
@@ -1580,6 +1580,8 @@ header_fail:
     c->height  = 0;
     c->tiles_x =
     c->tiles_y = 0;
+    c->tile_width =
+    c->tile_height = 0;
     return ret;
 }