[FFmpeg-cvslog] avfilter/avfilter: fix null pointer dereference with queued ping filters

Michael Niedermayer git at videolan.org
Tue Sep 10 14:21:35 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 10 13:39:57 2013 +0200| [bb23bf8fd7fb4771b0f08a4ee1ba8fe6ca16d14f] | committer: Michael Niedermayer

avfilter/avfilter: fix null pointer dereference with queued ping filters

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavfilter/avfilter.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 7f69f86..765b37a 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -427,7 +427,15 @@ void ff_update_link_current_pts(AVFilterLink *link, int64_t pts)
 int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags)
 {
     if(!strcmp(cmd, "ping")){
+        char local_res[256] = {0};
+
+        if (!res) {
+            res = local_res;
+            res_len = sizeof(local_res);
+        }
         av_strlcatf(res, res_len, "pong from:%s %s\n", filter->filter->name, filter->name);
+        if (res == local_res)
+            av_log(filter, AV_LOG_INFO, "%s", res);
         return 0;
     }else if(!strcmp(cmd, "enable")) {
         return set_enable_expr(filter, arg);



More information about the ffmpeg-cvslog mailing list