diff options
author | Lukasz Marek <lukasz.m.luki@gmail.com> | 2013-08-29 01:54:04 +0200 |
---|---|---|
committer | Lukasz Marek <lukasz.m.luki@gmail.com> | 2013-08-29 01:57:38 +0200 |
commit | f3ace37a3b8c93218630a37b7df4dc195f1215a9 (patch) | |
tree | 338cbfe767cd88d84f8271c23cbd2a08e99108bd /libavformat/ftp.c | |
parent | c4810fbe4f53d312ba70f251f7ee4f484cbca565 (diff) | |
download | ffmpeg-f3ace37a3b8c93218630a37b7df4dc195f1215a9.tar.gz |
lavf/ftp: fix possible crash
Diffstat (limited to 'libavformat/ftp.c')
-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 c73319d5f3..eb3827fa35 100644 --- a/libavformat/ftp.c +++ b/libavformat/ftp.c @@ -128,7 +128,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; } |