From: Wenxiang Qian <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavformat/ftp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index e072067480..3adc04ee1f 100644
--- a/libavformat/ftp.c
+++ b/libavformat/ftp.c
@@ -389,7 +389,7 @@ static int ftp_file_size(FTPContext *s)
static const int size_codes[] = {213, 0};
snprintf(command, sizeof(command), "SIZE %s\r\n", s->path);
- if (ftp_send_command(s, command, size_codes, &res) == 213 && res) {
+ if (ftp_send_command(s, command, size_codes, &res) == 213 && res &&
strlen(res) > 4) {
s->filesize = strtoll(&res[4], NULL, 10);
} else {
s->filesize = -1;
--
2.20.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel