[FFmpeg-cvslog] avfilter/vf_thumbnail: fix possible crash on error

Paul B Mahol git at videolan.org
Mon Feb 10 16:50:26 EET 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Mon Feb 10 15:42:52 2020 +0100| [e63a66416fe911e039c6959ace6badbe5f097e3b] | committer: Paul B Mahol

avfilter/vf_thumbnail: fix possible crash on error

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e63a66416fe911e039c6959ace6badbe5f097e3b
---

 libavfilter/vf_thumbnail.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_thumbnail.c b/libavfilter/vf_thumbnail.c
index a2e15d931e..ac04615bdc 100644
--- a/libavfilter/vf_thumbnail.c
+++ b/libavfilter/vf_thumbnail.c
@@ -162,7 +162,7 @@ static av_cold void uninit(AVFilterContext *ctx)
 {
     int i;
     ThumbContext *s = ctx->priv;
-    for (i = 0; i < s->n_frames && s->frames[i].buf; i++)
+    for (i = 0; i < s->n_frames && s->frames && s->frames[i].buf; i++)
         av_frame_free(&s->frames[i].buf);
     av_freep(&s->frames);
 }



More information about the ffmpeg-cvslog mailing list