[PATCH] echo-cancel: Avoid segfaults due to invalid master sink or source

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

 



On 01.05.2017 22:10, Tanu Kaskinen wrote:
> On Mon, 2017-04-24 at 19:33 +0200, Georg Chini wrote:
>> There are several places in module-echo-cancel where a segfault is
>> possible when the master sink or source is invalid.
> I don't think the rewind, volume and mute callbacks are ever called
> during stream moves, at least with the current code base. However,
> adding the extra checks does no harm either, so I don't mind, but I
> think the commit message should be clarified on this point.

I do not mention a move at all in the commit message, I just
say there are several places where a segfault is possible.

I think the rewind callback is called during a move, the
PA_SINK_MESSAGE_START_MOVE calls request_rewind().

Also the other checks are not pointless. In a situation where
a virtual sink is the only remaining sink, you can still try to
mute it or change the volume which will then crash PA.

>
>> This patch checks for the validity of master source or sink and
>> lets the functions just return if it is invalid.
>>
>> Other virtual sinks and sources will be fixed in a separate patch.
> Squashing the two patches would seem appropriate to me.
>
> The code changes in the other patch looked good to me (with the same
> caveat that most of the changes are probably unnecessary).
>
I'll squash them.



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

  Powered by Linux