summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorAndriy Gelman <andriy.gelman@gmail.com>2019-07-30 17:16:08 -0400
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2019-08-01 19:10:05 +0200
commitf60b1211b2aa7b6e8902d64072b678b4ccd87e54 (patch)
treede96c972672435a87534500e99e796e2d1e91754 /libavfilter
parent46b97c0527ed31bd583ee9ab0453e49291f88180 (diff)
downloadffmpeg-streaming-f60b1211b2aa7b6e8902d64072b678b4ccd87e54.zip
ffmpeg-streaming-f60b1211b2aa7b6e8902d64072b678b4ccd87e54.tar.gz
lavfi/zmq: Avoid mem copy past the end of input buffer
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/f_zmq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c
index 89da5be..744c721 100644
--- a/libavfilter/f_zmq.c
+++ b/libavfilter/f_zmq.c
@@ -139,7 +139,7 @@ static int recv_msg(AVFilterContext *ctx, char **buf, int *buf_size)
ret = AVERROR(ENOMEM);
goto end;
}
- memcpy(*buf, zmq_msg_data(&msg), *buf_size);
+ memcpy(*buf, zmq_msg_data(&msg), *buf_size - 1);
(*buf)[*buf_size-1] = 0;
end:
OpenPOWER on IntegriCloud