Re: [FFmpeg-devel] [PATCH v2 2/6] avcodec/cbs: Fix potential overflow

2019-11-17 Thread Mark Thompson
On 17/11/2019 07:34, Andreas Rheinhardt wrote: > The number of bits in a PutBitContext must fit into an int, yet nothing > guaranteed the size argument cbs_write_unit_data() uses in init_put_bits() > to be in the range 0..INT_MAX / 8. This has been changed. > > Furthermore, the check 8 * data_size

[FFmpeg-devel] [PATCH v2 2/6] avcodec/cbs: Fix potential overflow

2019-11-16 Thread Andreas Rheinhardt
The number of bits in a PutBitContext must fit into an int, yet nothing guaranteed the size argument cbs_write_unit_data() uses in init_put_bits() to be in the range 0..INT_MAX / 8. This has been changed. Furthermore, the check 8 * data_size > data_bit_start that there is data beyond the initial p