diff options
author | Lukasz Marek <lukasz.m.luki@gmail.com> | 2013-08-29 01:54:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-29 02:16:41 +0200 |
commit | 0cabb95811f9618f0f02fe20cd9d4b99a42e244b (patch) | |
tree | 6135384886a3bbdfb8086abb1aa2871dfd72a07f | |
parent | a1b32533aa7f31224f8f0be05d2cf020159e2e90 (diff) | |
download | ffmpeg-0cabb95811f9618f0f02fe20cd9d4b99a42e244b.tar.gz |
lavf/ftp: fix possible crash
(cherry picked from commit f3ace37a3b8c93218630a37b7df4dc195f1215a9)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/ftp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/ftp.c b/libavformat/ftp.c index 6358726034..572d4b4357 100644 --- a/libavformat/ftp.c +++ b/libavformat/ftp.c @@ -133,7 +133,8 @@ static int ftp_status(FTPContext *s, char **line, const int response_codes[]) while (!code_found || dash) { if ((err = ftp_get_line(s, buf, sizeof(buf))) < 0) { - av_bprint_finalize(&line_buffer, NULL); + if (line) + av_bprint_finalize(&line_buffer, NULL); return err; } |