From dde0b69477551eea6d2e647e90be9459b5c3f91c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Thu, 8 Mar 2018 13:45:19 +0100 Subject: [PATCH] ftp: Don't assert on a valid connection handle in Read() When seeking, if the reconnection fails, the connection handle will be NULL. Instead, try to reconnect and signal EOF if this can't be done. --- modules/access/ftp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/access/ftp.c b/modules/access/ftp.c index a5ad4ddabd..8100bf8444 100644 --- a/modules/access/ftp.c +++ b/modules/access/ftp.c @@ -900,7 +900,8 @@ static ssize_t Read( stream_t *p_access, void *p_buffer, size_t i_len ) { access_sys_t *p_sys = p_access->p_sys; - assert( p_sys->data != NULL ); + if( p_sys->data == NULL ) + return 0; assert( !p_sys->out ); ssize_t i_read = vlc_tls_Read( p_sys->data, p_buffer, i_len, false ); -- 2.11.4.GIT