summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-02-20 23:31:38 +0000
committerLennart Poettering <lennart@poettering.net>2006-02-20 23:31:38 +0000
commit2bdc07e2eabd791e48112593e0cec8baaa38a2fa (patch)
tree189fc3b554656c19cacd2918dbb457184fcce650
parent0858ef9bed00bf9cd14062e3980e495a01dafa66 (diff)
add validity check for the "server" parameter of pa_context_connect()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@536 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/polyp/context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/polyp/context.c b/src/polyp/context.c
index 2cb9e7e3..63acf19f 100644
--- a/src/polyp/context.c
+++ b/src/polyp/context.c
@@ -624,6 +624,7 @@ int pa_context_connect(
PA_CHECK_VALIDITY(c, c->state == PA_CONTEXT_UNCONNECTED, PA_ERR_BADSTATE);
PA_CHECK_VALIDITY(c, !(flags & ~PA_CONTEXT_NOAUTOSPAWN), PA_ERR_INVALID);
+ PA_CHECK_VALIDITY(c, !server || *server, PA_ERR_INVALID);
if (!server)
server = c->conf->default_server;