diff options
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/vividas.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/vividas.c b/libavformat/vividas.c index efe1b8deff..ab3947815a 100644 --- a/libavformat/vividas.c +++ b/libavformat/vividas.c @@ -438,7 +438,7 @@ static int track_index(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *bu ffio_read_varlen(pb); // track_index_len avio_r8(pb); // 'c' viv->n_sb_blocks = ffio_read_varlen(pb); - if (viv->n_sb_blocks * 2 > size) + if (viv->n_sb_blocks < 0 || viv->n_sb_blocks > size / 2) goto error; viv->sb_blocks = av_calloc(viv->n_sb_blocks, sizeof(VIV_SB_block)); if (!viv->sb_blocks) { |