mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avformat/ftp: Check string used for RNTO
Found-by: Forgejo Fairy
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4d24cb1c39)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1171,6 +1171,10 @@ static int ftp_move(URLContext *h_src, URLContext *h_dst)
|
||||
av_url_split(0, 0, 0, 0, 0, 0, 0,
|
||||
path, sizeof(path),
|
||||
h_dst->filename);
|
||||
if (is_bad_string(path)) {
|
||||
ret = AVERROR(EINVAL);
|
||||
goto cleanup;
|
||||
}
|
||||
ret = snprintf(command, sizeof(command), "RNTO %s\r\n", path);
|
||||
if (ret >= sizeof(command)) {
|
||||
ret = AVERROR(ENOSYS);
|
||||
|
||||
Reference in New Issue
Block a user