History

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

Michael Niedermayer committed 13 years ago

Commit bb23bf81 parent 9b07d341 file · +8 −0Browse files

Showing the changes to libavfilter/avfilter.c (1 of 1 file). Show all

Unified · Split

libavfilter/avfilter.c+8−0
@@ -427,7 +427,15 @@ void ff_update_link_current_pts(AVFilterLink *link, int64_t pts) · 426 unmodified lines
427int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags)427int avfilter_process_command(AVFilterContext *filter, const char *cmd, const char *arg, char *res, int res_len, int flags)
428{428{
429 if(!strcmp(cmd, "ping")){429 if(!strcmp(cmd, "ping")){
430 char local_res[256] = {0};
431
432 if (!res) {
433 res = local_res;
434 res_len = sizeof(local_res);
435 }
430 av_strlcatf(res, res_len, "pong from:%s %s\n", filter->filter->name, filter->name);436 av_strlcatf(res, res_len, "pong from:%s %s\n", filter->filter->name, filter->name);
437 if (res == local_res)
438 av_log(filter, AV_LOG_INFO, "%s", res);
431 return 0;439 return 0;
432 }else if(!strcmp(cmd, "enable")) {440 }else if(!strcmp(cmd, "enable")) {
433 return set_enable_expr(filter, arg);441 return set_enable_expr(filter, arg);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t