[FFmpeg-devel] [PATCH 01/10] avcodec/dca: remove Rice code length limit

Paul B Mahol onemda at gmail.com
Fri May 20 14:46:58 CEST 2016


On 5/20/16, Christophe Gisquet <christophe.gisquet at gmail.com> wrote:
> 2016-05-13 11:48 GMT+02:00 foo86 <foobaz86 at gmail.com>:
>> -    unsigned int v = get_unary(gb, 1, 128);
>> +    unsigned int v = get_unary(gb, 1, get_bits_left(gb));
>
> Not that the patch is not ok, but I have a few uneducated questions:
> 1) Given the get_bits_long(gb, k) afterwards, won't that code cause
> overreads for corrupted bitstreams?

No, because checking for overreads is enabled.

> 2) I haven't checked the calling code, but consequently, wouldn't it
> be better to first check that at least k+1 bits are available?
> 3) 128 is already fairly large; is the new code for valid bitstreams
> (in the sense of specs and actually generated) or for corrupted
> bitstreams? I don't know where the parsing is validated afterwards
> (e.g. if there have been overreads or invalid values parsed)
>
> Thanks,
> --
> Christophe
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list