[FFmpeg-devel] [PATCH v2] avformat/ftp: Solve a crash bug when network occur a exception

Michael Niedermayer michael at niedermayer.cc
Thu Apr 6 00:51:04 EEST 2017


On Tue, Apr 04, 2017 at 10:12:19PM +0800, F1 wrote:
> This fixes a proble where ffmpeg would cause crash to do a seek when the network disconnect.
> The log like this:
> 01-01 10:53:03.441  6580  6580 F DEBUG   : backtrace:
> 01-01 10:53:03.441  6580  6580 F DEBUG   :     #00 pc 0002942e  /system/lib/libavformat.so (ffurl_write+9)
> 
> Signed-off-by: tiejun.peng <tiejun.peng at foxmail.com>
> ---
>  libavformat/ftp.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavformat/ftp.c b/libavformat/ftp.c
> index 0663b47..9aa7a45 100644
> --- a/libavformat/ftp.c
> +++ b/libavformat/ftp.c
> @@ -206,6 +206,9 @@ static int ftp_send_command(FTPContext *s, const char *command,
>      if (response)
>          *response = NULL;
>  
> +    if (!s->conn_control)
> +        return AVERROR(EIO);
> +
>      if ((err = ffurl_write(s->conn_control, command, strlen(command))) < 0)
>          return err;
>      if (!err)
> -- 
> 
> Please have a look this patch, give some advice or merge it.
> Thank you .

applied

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170405/b5f9c627/attachment.sig>


More information about the ffmpeg-devel mailing list