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

Neil Birkbeck neil.birkbeck at gmail.com
Tue Nov 22 02:37:06 EET 2016


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));


More information about the ffmpeg-devel mailing list