[FFmpeg-devel] [PATCH 2/6] avformat/ftp: check return value of av_bprint_finalize()

Marton Balint cus at passwd.hu
Tue Jun 23 00:08:23 EEST 2020



On Mon, 22 Jun 2020, lance.lmwang at gmail.com wrote:

> From: Limin Wang <lance.lmwang at gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> ---
> libavformat/ftp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/ftp.c b/libavformat/ftp.c
> index caeea42..39ea297 100644
> --- a/libavformat/ftp.c
> +++ b/libavformat/ftp.c
> @@ -200,7 +200,7 @@ static int ftp_status(FTPContext *s, char **line, const int response_codes[])
>     }
>
>     if (line)
> -        av_bprint_finalize(&line_buffer, line);
> +        result = av_bprint_finalize(&line_buffer, line);

No. ftp_status is not a function which returns 0 on success, it returns 
the FTP status code. Please be more careful before submitting patches.

Regards,
Marton


More information about the ffmpeg-devel mailing list