mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
avcodec/vorbisdec: validate windowtype and transformtype
This commit is contained in:
committed by
michaelni
co-authored by
michaelni
parent
5abc240a27
commit
3b19a61837
@@ -908,8 +908,13 @@ static int vorbis_parse_setup_hdr_modes(vorbis_context *vc)
|
||||
vorbis_mode *mode_setup = &vc->modes[i];
|
||||
|
||||
mode_setup->blockflag = get_bits1(gb);
|
||||
mode_setup->windowtype = get_bits(gb, 16); //FIXME check
|
||||
mode_setup->transformtype = get_bits(gb, 16); //FIXME check
|
||||
mode_setup->windowtype = get_bits(gb, 16);
|
||||
mode_setup->transformtype = get_bits(gb, 16);
|
||||
if (mode_setup->transformtype != 0 || mode_setup->windowtype != 0) {
|
||||
av_log(vc->avctx, AV_LOG_WARNING,
|
||||
"Invalid mode: windowtype %u, transformtype %u (both must be 0)\n",
|
||||
mode_setup->windowtype, mode_setup->transformtype);
|
||||
}
|
||||
GET_VALIDATED_INDEX(mode_setup->mapping, 8, vc->mapping_count);
|
||||
|
||||
ff_dlog(NULL, " %u mode: blockflag %d, windowtype %d, transformtype %d, mapping %d\n",
|
||||
|
||||
Reference in New Issue
Block a user