[FFmpeg-cvslog] vf_frei0r: prevent a segfault when filter parameters are not set

Vittorio Giovara git at videolan.org
Tue Mar 11 13:12:01 CET 2014


ffmpeg | branch: release/2.2 | Vittorio Giovara <vittorio.giovara at gmail.com> | Thu Feb 27 12:06:15 2014 +0100| [416847d19593e87ee1704c26a9a638fd6b0d977c] | committer: Reinhard Tartler

vf_frei0r: prevent a segfault when filter parameters are not set

(cherry picked from commit 4e0be9c86f2003dd3ba2eb8fad01e8d0e538075e)

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

 libavfilter/vf_frei0r.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c
index 9c6b84b..670fa18 100644
--- a/libavfilter/vf_frei0r.c
+++ b/libavfilter/vf_frei0r.c
@@ -465,6 +465,10 @@ static int source_config_props(AVFilterLink *outlink)
         av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance");
         return AVERROR(EINVAL);
     }
+    if (!s->params) {
+        av_log(ctx, AV_LOG_ERROR, "frei0r filter parameters not set.\n");
+        return AVERROR(EINVAL);
+    }
 
     return set_params(ctx, s->params);
 }



More information about the ffmpeg-cvslog mailing list