[FFmpeg-devel] Fix undefined behavior in ff_configure_buffers_for_index()

Dale Curtis dalecurtis at chromium.org
Thu Feb 6 22:33:07 EET 2020


Bump to apply?

- dale

On Thu, Jan 30, 2020 at 3:21 PM Dale Curtis <dalecurtis at google.com> wrote:

> On Thu, Jan 30, 2020 at 11:23 AM Dale Curtis <dalecurtis at chromium.org>
> wrote:
>
>> On Wed, Jan 29, 2020 at 10:23 PM Michael Niedermayer
>> <michael at niedermayer.cc> wrote:
>>
>>> so i think it works but maybe ive missed something, for which values
>>> of e2_pts do you see a problem with e1_pts = INT64_MIN?
>>>
>>
>> For e1_pts = INT64_MIN and e2_pts >= 0 you end up with a negative int64_t
>> result for e2_pts - (uint64_t)e1_pts, so it's always < time_tolerance. If
>> that's what you intended, then sgtm.
>>
>
> Actually, this was a test construction error on my part. In a conditional
> this does evaluate to a uint64_t vs int64_t, so the comparison is valid.
> I've attached your recommended patch. Thanks for your patience.
>
> - dale
>
>
>


More information about the ffmpeg-devel mailing list