[vlc-devel] [PATCH] es_out: merge es->i_id with es->fmt.i_id
fcvlcdev at free.fr
Fri Aug 17 15:21:28 CEST 2018
Le 17/08/2018 à 15:07, Thomas Guillem a écrit :
> On Fri, Aug 17, 2018, at 15:00, Francois Cartegnie wrote:
>> Le 17/08/2018 à 14:43, Thomas Guillem a écrit :
>>> Should we identify an ES track with a uint64_t that is always
>>> incremented from the es_out ?
>>> This will allow to either:
>>> - select a track via the original fmt.i_id (for advanced users via
>>> params/libvlc only, this doesn't prevent es id collision) - select a track with this unique uint64_t id (this will be the id
>>> propagated via input events).
>> I don't see why an uint32_t counter would be less prone to overflow than
>> uin64_t in our use case
> If you end up creating more than 4.2949673E9 ES tracks, I think something is wrong (sample is an exploit?) and the input should be terminated right away.
> Could you propose other solutions ?
I can ES add/del UINT64_MAX. Larger counter won't solve anything.
You can't track usable ids unless you allocate UINTxx_MAX bits to
reference id usage, and add a worth case time of that number of bytes - 1.
Someone considered there was no issue in refcounters overflows because
it was unlikely to be ever reached.
VideoLAN - VLC Developer
More information about the vlc-devel