[FFmpeg-cvslog] lavf/ftp: fix possible crash
Lukasz Marek
git at videolan.org
Thu Aug 29 02:30:48 CEST 2013
ffmpeg | branch: release/2.0 | Lukasz Marek <lukasz.m.luki at gmail.com> | Thu Aug 29 01:54:04 2013 +0200| [0cabb95811f9618f0f02fe20cd9d4b99a42e244b] | committer: Michael Niedermayer
lavf/ftp: fix possible crash
(cherry picked from commit f3ace37a3b8c93218630a37b7df4dc195f1215a9)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0cabb95811f9618f0f02fe20cd9d4b99a42e244b
---
libavformat/ftp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/ftp.c b/libavformat/ftp.c
index 6358726..572d4b4 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;
}
More information about the ffmpeg-cvslog
mailing list