You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-06 06:27:36 +02:00
lavfi/zmq: Avoid mem copy past the end of input buffer
This commit is contained in:
committed by
Carl Eugen Hoyos
parent
46b97c0527
commit
f60b1211b2
@ -139,7 +139,7 @@ static int recv_msg(AVFilterContext *ctx, char **buf, int *buf_size)
|
|||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
memcpy(*buf, zmq_msg_data(&msg), *buf_size);
|
memcpy(*buf, zmq_msg_data(&msg), *buf_size - 1);
|
||||||
(*buf)[*buf_size-1] = 0;
|
(*buf)[*buf_size-1] = 0;
|
||||||
|
|
||||||
end:
|
end:
|
||||||
|
Reference in New Issue
Block a user