Commit e3324a4aa4 for ffmpeg
commit e3324a4aa43fd651815e64e3034793b52b802f14
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Sat Nov 14 05:20:17 2026 +0100
avfilter/f_zmq: reply to commands that cannot be parsed
Found during triage of the security report AISLE-2026-0166-00548
diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c
index 6b9e55897b..9a3630eced 100644
--- a/libavfilter/f_zmq.c
+++ b/libavfilter/f_zmq.c
@@ -161,11 +161,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *ref)
zmq->command_count++;
/* parse command */
- if (parse_command(&cmd, recv_buf, ctx) < 0) {
+ ret = parse_command(&cmd, recv_buf, ctx);
+ if (ret < 0) {
av_log(ctx, AV_LOG_ERROR, "Could not parse command #%d\n", zmq->command_count);
- goto end;
- }
-
+ cmd_buf[0] = 0;
+ } else {
/* process command */
av_log(ctx, AV_LOG_VERBOSE,
"Processing command #%d target:%s command:%s arg:%s\n",
@@ -174,6 +174,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *ref)
cmd.target, cmd.command, cmd.arg,
cmd_buf, sizeof(cmd_buf),
AVFILTER_CMD_FLAG_ONE);
+ }
send_buf = av_asprintf("%d %s%s%s",
-ret, av_err2str(ret), cmd_buf[0] ? "\n" : "", cmd_buf);
if (!send_buf) {