[pulseaudio-discuss] [PATCH] sink-input, source-output: Don't crash if format negotiation fails
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Fri Feb 14 15:12:19 CET 2014
On Wed, 2014-02-12 at 12:41 +0200, Tanu Kaskinen wrote:
> A segfault was reported on this line:
>
> pa_return_val_if_fail(PA_SINK_IS_LINKED(pa_sink_get_state(data->sink)), -PA_ERR_BADSTATE);
>
> After expanding the pa_sink_get_state() macro, the line looks like
> this:
>
> pa_return_val_if_fail(PA_SINK_IS_LINKED(data->sink->state), -PA_ERR_BADSTATE);
>
> So data->sink was apparently NULL. That could happen if we try to fall
> back to the default sink, but format negotiation fails.
>
> This bug was introduced in commit
> 71816ecb7f81fe7a124cefa2258cfa64046908a1.
>
> BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=74646
> ---
> src/pulsecore/sink-input.c | 14 +++++++-------
> src/pulsecore/source-output.c | 10 +++++-----
> 2 files changed, 12 insertions(+), 12 deletions(-)
I got an ack from David in IRC, so this has now been pushed to master.
--
Tanu
More information about the pulseaudio-discuss
mailing list