[pulseaudio-discuss] [PATCH v2 0/6] Coverity cleanups
Tanu Kaskinen
tanuk at iki.fi
Mon Sep 5 16:37:05 UTC 2016
On Sun, 2016-09-04 at 23:12 +0200, Peter Meerwald-Stadler wrote:
> >
> > >
> > > v2 of Coverity cleanups, thanks for feedback from Tanu
> > >
> > > Peter Meerwald-Stadler (6):
> > > padsp: Fix flush and improve error handling
> > > core: Replace PA_PAGE_SIZE with pa_page_size()
> > > tests: Assert granularity range in stripnul.c
> > > source-output: Avoid potential NULL dereference
> > > sink-input: Avoid potential NULL dereference
> > > sample: RFC: Assert validity of sample_spec
> >
> > Apart from the source-output/sink-input patches, these look good to me.
>
> Applied.
> Regarding the source-output/sink-input patches, do you think the patch
> description is inappropriate or do you object the patch itself?
> You suggested just asserting data->source...
Since there isn't (or shouldn't be) any chance of NULL dereference with
the current code, the only purpose of the patch is to make Coverity
happy. I think it's nicer to do that with an assert than modifying the
if condition in a way that makes no difference in behaviour, and is
misleading if not accompanied with a comment explaining why we check
both data->format and data->source when it's sufficient to only check
data->format.
--
Tanu
More information about the pulseaudio-discuss
mailing list