[PATCH] sink-input, source-output: Don't crash if format negotiation fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux