Re: [FFmpeg-devel] [PATCH 2/7] avutil/bprint: Allow size == 0 in av_bprint_init_for_buffer()

2023-08-09 Thread Andreas Rheinhardt
James Almer: > On 8/9/2023 7:08 AM, Nicolas George wrote: >> Andreas Rheinhardt (12023-08-06): >>> The AVBPrint API guarantees that the string buffer is always >>> zero-terminated; in order to honour this guarantee, there >>> obviously must be a string buffer at all and it must have >>> a size >=

Re: [FFmpeg-devel] [PATCH 2/7] avutil/bprint: Allow size == 0 in av_bprint_init_for_buffer()

2023-08-09 Thread James Almer
On 8/9/2023 7:08 AM, Nicolas George wrote: Andreas Rheinhardt (12023-08-06): The AVBPrint API guarantees that the string buffer is always zero-terminated; in order to honour this guarantee, there obviously must be a string buffer at all and it must have a size >= 1. Therefore

Re: [FFmpeg-devel] [PATCH 2/7] avutil/bprint: Allow size == 0 in av_bprint_init_for_buffer()

2023-08-09 Thread Nicolas George
Andreas Rheinhardt (12023-08-06): > The AVBPrint API guarantees that the string buffer is always > zero-terminated; in order to honour this guarantee, there > obviously must be a string buffer at all and it must have > a size >= 1. Therefore av_bprint_init_for_buffer() treats > passing a NULL

Re: [FFmpeg-devel] [PATCH 2/7] avutil/bprint: Allow size == 0 in av_bprint_init_for_buffer()

2023-08-09 Thread Andreas Rheinhardt
Andreas Rheinhardt: > The AVBPrint API guarantees that the string buffer is always > zero-terminated; in order to honour this guarantee, there > obviously must be a string buffer at all and it must have > a size >= 1. Therefore av_bprint_init_for_buffer() treats > passing a NULL buffer or size ==

[FFmpeg-devel] [PATCH 2/7] avutil/bprint: Allow size == 0 in av_bprint_init_for_buffer()

2023-08-06 Thread Andreas Rheinhardt
The AVBPrint API guarantees that the string buffer is always zero-terminated; in order to honour this guarantee, there obviously must be a string buffer at all and it must have a size >= 1. Therefore av_bprint_init_for_buffer() treats passing a NULL buffer or size == 0 as invalid data that leads