On 11/12/2019 2:52 AM, Ronald S. Bultje wrote:
> Hi,
> 
> On Mon, Nov 11, 2019 at 9:17 PM James Almer <jamr...@gmail.com> wrote:
> 
>> +static int leb(AVIOContext *pb, uint32_t *len) {
>>
> 
>  this can overflow, should be uint64_t.
> 
> 
>> +        unsigned bits;
>>
> 
> Same.
> 
> Ronald

I used the same method as in dav1d, it will not overflow as it will not
try to load more than five bytes worth leb128 data, ensuring to only
accept up to 4 bits from the last, resulting in assembled values up to
UINT32_MAX.

> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
> 

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to