[vlc-commits] asf: Reject seeking when no file properties object is available
Hugo Beauzée-Luyssen
git at videolan.org
Wed Aug 14 18:13:29 CEST 2019
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Aug 2 14:33:25 2019 +0200| [078afb259f06d5a59624f26cbdd2b79a4e5ea713] | committer: Hugo Beauzée-Luyssen
asf: Reject seeking when no file properties object is available
CVE-2019-14534
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=078afb259f06d5a59624f26cbdd2b79a4e5ea713
---
modules/demux/asf/asf.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 9bc4b3de70..6724e38428 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -428,7 +428,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_SUCCESS;
case DEMUX_SET_TIME:
- if ( p_sys->p_fp &&
+ if ( !p_sys->p_fp ||
! ( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) )
return VLC_EGENERIC;
@@ -509,8 +509,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
i_query, args );
case DEMUX_SET_POSITION:
- if ( p_sys->p_fp &&
- ! ( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) && !p_sys->b_index )
+ if ( !p_sys->p_fp ||
+ ( !( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) && !p_sys->b_index ) )
return VLC_EGENERIC;
SeekPrepare( p_demux );
@@ -533,8 +533,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_SUCCESS;
case DEMUX_CAN_SEEK:
- if ( p_sys->p_fp &&
- ! ( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) && !p_sys->b_index )
+ if ( !p_sys->p_fp ||
+ ( !( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) && !p_sys->b_index ) )
{
bool *pb_bool = va_arg( args, bool * );
*pb_bool = false;
More information about the vlc-commits
mailing list