[FFmpeg-devel] [PATCH] Change type to 16 bit.
Nicolas George
george at nsup.org
Sat Apr 26 12:53:50 CEST 2014
Le septidi 7 floréal, an CCXXII, Reimar Döffinger a écrit :
> Hm?
> res_setup->ptns_to_read =
> (res_setup->end - res_setup->begin) / res_setup->partition_size;
> /* Validations to prevent a buffer overflow later. */
> if (res_setup->begin>res_setup->end ||
> res_setup->end > (res_setup->type == 2 ? vc->audio_channels : 1) * vc->blocksize[1] / 2 ||
> res_setup->ptns_to_read > V_MAX_PARTITIONS) {
There is something going on I do not understand, because the code I can see
at Git HEAD is:
res_setup->begin = get_bits(gb, 24);
res_setup->end = get_bits(gb, 24);
res_setup->partition_size = get_bits(gb, 24) + 1;
/* Validations to prevent a buffer overflow later. */
if (res_setup->begin>res_setup->end ||
res_setup->end > (res_setup->type == 2 ? vc->audio_channels : 1) * vc->blocksize[1] / 2 ||
(res_setup->end-res_setup->begin) / res_setup->partition_size > V_MAX_PARTITIONS) {
av_log(vc->avctx, AV_LOG_ERROR,
"partition out of bounds: type, begin, end, size, blocksize: %"PRIu16", %"PRIu32", %"PRIu32", %u, %"PRIu32"\n",
res_setup->type, res_setup->begin, res_setup->end,
res_setup->partition_size, vc->blocksize[1] / 2);
return AVERROR_INVALIDDATA;
}
res_setup->classifications = get_bits(gb, 6) + 1;
GET_VALIDATED_INDEX(res_setup->classbook, 8, vc->codebook_count)
res_setup->ptns_to_read =
(res_setup->end - res_setup->begin) / res_setup->partition_size;
It does not seem to have changed recently either.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140426/949a45e2/attachment.asc>
More information about the ffmpeg-devel
mailing list