ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Tue Jul 21 14:40:00 2015 +0000| [625bf6a55c3dd25613ba328f93d0fd23b5bb7c0f] | committer: Paul B Mahol
avfilter/vf_reverse: check also pts_size when reallocating Fixes crash of x32. Signed-off-by: Paul B Mahol <one...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=625bf6a55c3dd25613ba328f93d0fd23b5bb7c0f --- libavfilter/vf_reverse.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_reverse.c b/libavfilter/vf_reverse.c index 0d6dff2..4930238 100644 --- a/libavfilter/vf_reverse.c +++ b/libavfilter/vf_reverse.c @@ -72,15 +72,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVFilterContext *ctx = inlink->dst; ReverseContext *s = ctx->priv; + void *ptr; - if (s->nb_frames + 1 > s->frames_size / sizeof(*(s->frames))) { - void *ptr; - + if (s->nb_frames + 1 > s->pts_size / sizeof(*(s->pts))) { ptr = av_fast_realloc(s->pts, &s->pts_size, s->pts_size * 2); if (!ptr) return AVERROR(ENOMEM); s->pts = ptr; + } + if (s->nb_frames + 1 > s->frames_size / sizeof(*(s->frames))) { ptr = av_fast_realloc(s->frames, &s->frames_size, s->frames_size * 2); if (!ptr) return AVERROR(ENOMEM); _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog