aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/ftp.c
diff options
context:
space:
mode:
authorLukasz Marek <lukasz.m.luki@gmail.com>2013-08-29 01:54:04 +0200
committerLukasz Marek <lukasz.m.luki@gmail.com>2013-08-29 01:57:38 +0200
commitf3ace37a3b8c93218630a37b7df4dc195f1215a9 (patch)
tree338cbfe767cd88d84f8271c23cbd2a08e99108bd /libavformat/ftp.c
parentc4810fbe4f53d312ba70f251f7ee4f484cbca565 (diff)
downloadffmpeg-f3ace37a3b8c93218630a37b7df4dc195f1215a9.tar.gz
lavf/ftp: fix possible crash
Diffstat (limited to 'libavformat/ftp.c')
-rw-r--r--libavformat/ftp.c3
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;
}