return -1;
}
+ if (!PA_VOLUME_IS_VALID(volume)) {
+ pa_strbuf_puts(buf, "Volume outside permissible range.\n");
+ return -1;
+ }
+
if (!(sink = pa_namereg_get(c, n, PA_NAMEREG_SINK))) {
pa_strbuf_puts(buf, "No sink found by this name or index.\n");
return -1;
return -1;
}
+ if (!PA_VOLUME_IS_VALID(volume)) {
+ pa_strbuf_puts(buf, "Volume outside permissible range.\n");
+ return -1;
+ }
+
if (!(si = pa_idxset_get_by_index(c->sink_inputs, (uint32_t) idx))) {
pa_strbuf_puts(buf, "No sink input found with this index.\n");
return -1;
return -1;
}
+ if (!PA_VOLUME_IS_VALID(volume)) {
+ pa_strbuf_puts(buf, "Volume outside permissible range.\n");
+ return -1;
+ }
+
if (!(source = pa_namereg_get(c, n, PA_NAMEREG_SOURCE))) {
pa_strbuf_puts(buf, "No source found by this name or index.\n");
return -1;