diff --git a/libavformat/brstm.c b/libavformat/brstm.c index 15e63b8170..564be16ac6 100644 --- a/libavformat/brstm.c +++ b/libavformat/brstm.c @@ -223,7 +223,7 @@ static int read_header(AVFormatContext *s) } b->block_size = read32(s); - if (b->block_size > UINT16_MAX / st->codec->channels) + if (b->block_size > UINT32_MAX / st->codec->channels) return AVERROR_INVALIDDATA; b->block_size *= st->codec->channels;