On Thu, 2016-08-18 at 18:17 +0200, Peter Meerwald-Stadler wrote: > if data->sink is NULL, pa_sink_input_new_data_set_sink() may fail to set data->sink; > the false retval is ignored, leading to a NULL dereference in pa_sink_get_state(data->sink) below > > CID 1323591 > --- > Â src/pulsecore/sink-input.c | 3 ++- > Â 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c > index 435e63e..36f4aa8 100644 > --- a/src/pulsecore/sink-input.c > +++ b/src/pulsecore/sink-input.c > @@ -329,7 +329,8 @@ int pa_sink_input_new( > Â Â Â Â Â if (!data->sink) { > Â Â Â Â Â Â Â Â Â pa_sink *sink = pa_namereg_get(core, NULL, PA_NAMEREG_SINK); > Â Â Â Â Â Â Â Â Â pa_return_val_if_fail(sink, -PA_ERR_NOENTITY); > -Â Â Â Â Â Â Â Â pa_sink_input_new_data_set_sink(data, sink, false); > +Â Â Â Â Â Â Â Â if (!pa_sink_input_new_data_set_sink(data, sink, false)) > +Â Â Â Â Â Â Â Â Â Â Â Â return -PA_ERR_NOTSUPPORTED; > Â Â Â Â Â } > Â > Â Â Â Â Â /* If something didn't pick a format for us, pick the top-most format since Same comment as for the source-output patch. --Â Tanu