Skip to content
Snippets Groups Projects
Commit bb23bf8f authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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

parent 9b07d34e
No related branches found
No related tags found
No related merge requests found
...@@ -427,7 +427,15 @@ void ff_update_link_current_pts(AVFilterLink *link, int64_t pts) ...@@ -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) int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags)
{ {
if(!strcmp(cmd, "ping")){ 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); 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; return 0;
}else if(!strcmp(cmd, "enable")) { }else if(!strcmp(cmd, "enable")) {
return set_enable_expr(filter, arg); return set_enable_expr(filter, arg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment