From 5d022a07a635568f7964e24b326cebaf8d64b7da Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sat, 11 Jul 2020 13:58:36 +0300 Subject: [PATCH] introspect: Add version check to pa_context_send_message_to_object() If an application calls the function when the server doesn't support the feature, the result should be just an error from the function. Without the check the whole connection gets terminated due to protocol error. Part-of: --- src/pulse/introspect.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c index 0671fa163..daae4cac4 100644 --- a/src/pulse/introspect.c +++ b/src/pulse/introspect.c @@ -2262,6 +2262,7 @@ pa_operation* pa_context_send_message_to_object(pa_context *c, const char *objec PA_CHECK_VALIDITY_RETURN_NULL(c, !pa_detect_fork(), PA_ERR_FORKED); PA_CHECK_VALIDITY_RETURN_NULL(c, c->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); + PA_CHECK_VALIDITY_RETURN_NULL(c, c->version >= 35, PA_ERR_NOTSUPPORTED); o = pa_operation_new(c, NULL, (pa_operation_cb_t) cb, userdata);