[vlc-commits] asf: Reject seeking when no file properties object is available
Hugo Beauzée-Luyssen
git at videolan.org
Wed Aug 14 18:24:30 CEST 2019
vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Aug 2 14:33:25 2019 +0200| [aad818bf380383246f090c94dcda9136a8d1fdfe] | committer: Hugo Beauzée-Luyssen
asf: Reject seeking when no file properties object is available
CVE-2019-14534
(cherry picked from commit 078afb259f06d5a59624f26cbdd2b79a4e5ea713)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=aad818bf380383246f090c94dcda9136a8d1fdfe
---
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 60c604be22..e626d5a9d7 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -434,7 +434,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;
@@ -512,8 +512,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 );
@@ -536,8 +536,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