[FFmpeg-devel] [PATCH] avformat/utils: check for overflow before reallocating side data

James Almer jamrial at gmail.com
Tue Nov 22 04:06:28 EET 2016


On 11/21/2016 9:37 PM, Neil Birkbeck wrote:
> On Sat, Nov 19, 2016 at 3:28 PM, James Almer <jamrial at gmail.com> wrote:
> 
>> On 11/19/2016 7:19 PM, Michael Niedermayer wrote:
>>> On Sat, Nov 19, 2016 at 03:09:15PM -0300, James Almer wrote:
>>>> This makes av_stream_add_side_data() consistent with
>> av_packet_add_side_data().
>>>>
>>>> Signed-off-by: James Almer <jamrial at gmail.com>
>>>> ---
>>>>  libavformat/utils.c | 5 ++++-
>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> LGTM
>>>
>>> thx
>>
>> Pushed, Thanks.
> 
> 
> Isn't the realloc missing brackets around the num elements:
>    tmp = av_realloc(st->side_data, (st->nb_side_data + 1) * sizeof(*tmp));

Yikes, yes, thanks a lot for noticing. Pushed that fix.



More information about the ffmpeg-devel mailing list