Skip to content

Commit 078afb2

Browse files
committed
asf: Reject seeking when no file properties object is available
CVE-2019-14534
1 parent 4d2f92b commit 078afb2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/demux/asf/asf.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
428428
return VLC_SUCCESS;
429429

430430
case DEMUX_SET_TIME:
431-
if ( p_sys->p_fp &&
431+
if ( !p_sys->p_fp ||
432432
! ( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) )
433433
return VLC_EGENERIC;
434434

@@ -509,8 +509,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
509509
i_query, args );
510510

511511
case DEMUX_SET_POSITION:
512-
if ( p_sys->p_fp &&
513-
! ( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) && !p_sys->b_index )
512+
if ( !p_sys->p_fp ||
513+
( !( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) && !p_sys->b_index ) )
514514
return VLC_EGENERIC;
515515

516516
SeekPrepare( p_demux );
@@ -533,8 +533,8 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
533533
return VLC_SUCCESS;
534534

535535
case DEMUX_CAN_SEEK:
536-
if ( p_sys->p_fp &&
537-
! ( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) && !p_sys->b_index )
536+
if ( !p_sys->p_fp ||
537+
( !( p_sys->p_fp->i_flags & ASF_FILE_PROPERTIES_SEEKABLE ) && !p_sys->b_index ) )
538538
{
539539
bool *pb_bool = va_arg( args, bool * );
540540
*pb_bool = false;

0 commit comments

Comments
 (0)