Hi,

On Tue, Nov 12, 2019 at 8:09 AM James Almer <jamr...@gmail.com> wrote:

> 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.


Oh, you are right, I was looking at "if (++i == 8 && more)", but the line
above it ("if (i <= 3 || (i == 4 && bits < (1 << 4)))") demonstrates
quickly that this is different. It's OK here, although a bit confusing, but
I should probably fix that in dav1d first.

Rest of patchset lgtm, and thanks for adding this feature, this is
genuinely very useful for AV1 users in more complex AV1 processing
pipelines. Section5 would be nice also ;-).

Ronald
_______________________________________________
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