[pulseaudio-commits] Branch 'next' - src/pulsecore
Tanu Kaskinen
tanuk at kemper.freedesktop.org
Tue Feb 4 11:32:03 PST 2014
src/pulsecore/protocol-native.c | 1 +
1 file changed, 1 insertion(+)
New commits:
commit ce9ae6bfb62ccb8460902941857879c5bfe33a05
Author: Tanu Kaskinen <tanu.kaskinen at linux.intel.com>
Date: Tue Feb 4 21:28:44 2014 +0200
protocol-native: Fix a crash
Without this check pa_source_output_set_volume() crashes if
so->volume_writable is false. The same check already exists for sink
inputs.
BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=74529
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index 7361a89..41b4b50 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -3785,6 +3785,7 @@ static void command_set_volume(
pa_strnull(pa_proplist_gets(si->proplist, PA_PROP_MEDIA_NAME)));
pa_sink_input_set_volume(si, &volume, true, true);
} else if (so) {
+ CHECK_VALIDITY(c->pstream, so->volume_writable, tag, PA_ERR_BADSTATE);
CHECK_VALIDITY(c->pstream, volume.channels == 1 || pa_cvolume_compatible(&volume, &so->sample_spec), tag, PA_ERR_INVALID);
pa_log_debug("Client %s changes volume of source output %s.",
More information about the pulseaudio-commits
mailing list