Re: [FFmpeg-devel] [PATCH v2 02/14] bytestream: Make get_bytes_left compatible with overread

2019-12-15 Thread Michael Niedermayer
On Mon, Dec 16, 2019 at 12:05:52AM +0100, Andreas Rheinhardt wrote: > On Sun, Dec 15, 2019 at 11:53 PM Michael Niedermayer > wrote: > > > On Sat, Dec 14, 2019 at 11:19:14PM +0100, Andreas Rheinhardt wrote: > > > bytestream2_get_bytes_left returns an unsigned int; as a result, > > > it returns big

Re: [FFmpeg-devel] [PATCH v2 02/14] bytestream: Make get_bytes_left compatible with overread

2019-12-15 Thread Andreas Rheinhardt
On Sun, Dec 15, 2019 at 11:53 PM Michael Niedermayer wrote: > On Sat, Dec 14, 2019 at 11:19:14PM +0100, Andreas Rheinhardt wrote: > > bytestream2_get_bytes_left returns an unsigned int; as a result, > > it returns big positive numbers if an overread already happened, > > making it unsuitable for

Re: [FFmpeg-devel] [PATCH v2 02/14] bytestream: Make get_bytes_left compatible with overread

2019-12-15 Thread Michael Niedermayer
On Sat, Dec 14, 2019 at 11:19:14PM +0100, Andreas Rheinhardt wrote: > bytestream2_get_bytes_left returns an unsigned int; as a result, > it returns big positive numbers if an overread already happened, > making it unsuitable for scenarios where one wants to allow this > in a controlled way (because

[FFmpeg-devel] [PATCH v2 02/14] bytestream: Make get_bytes_left compatible with overread

2019-12-14 Thread Andreas Rheinhardt
bytestream2_get_bytes_left returns an unsigned int; as a result, it returns big positive numbers if an overread already happened, making it unsuitable for scenarios where one wants to allow this in a controlled way (because the buffer is actually padded so that no segfaults can happen). So change i