Skip to content

pactl: Stop a crash when setting the volume which is out of range

When set_sink_volume_callback calls "pa_context_set_sink_volume_by_name" The following check fails. PA_CHECK_VALIDITY_RETURN_NULL(c, pa_cvolume_valid(volume), PA_ERR_INVALID); which returns a NULL object.

Then back in set_sink_volume_callback it attempts to unref a NULL object.

Since function simple_callback isn’t called due to the above failure, we must call complete_action to ensue the process exits.

Fixes #1407 (closed)

Merge request reports