[vlc-devel] [PATCH 1/9] audio_output: fix potential null-dereference

Thomas Guillem thomas at gllm.fr
Thu Sep 1 11:33:40 CEST 2016



On Thu, Sep 1, 2016, at 11:28, Rémi Denis-Courmont wrote:
> Le torstaina 1. syyskuuta 2016, 10.54.08 EEST Thomas Guillem a écrit :
> > It can happen when a converter returns NULL in pf_audio_filter.
> > ---
> >  src/audio_output/filters.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
> > index 83e8646..e70f248 100644
> > --- a/src/audio_output/filters.c
> > +++ b/src/audio_output/filters.c
> > @@ -573,6 +573,8 @@ block_t *aout_FiltersPlay (aout_filters_t *filters,
> > block_t *block, int rate) }
> > 
> >      block = aout_FiltersPipelinePlay (filters->tab, filters->count, block);
> > +    if (block == NULL)
> > +        return NULL;
> >      if (filters->resampler != NULL)
> >      {   /* NOTE: the resampler needs to run even if resampling is 0.
> >           * The decoder and output rates can still be different. */
> 
> I think this causes necessary code to no longer run (regardless of block
> being 
> NULL).

Oh, I didn't see the block != NULL check in aout_FiltersPipelinePlay. So
this patch is useless.


> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list