summaryrefslogtreecommitdiffstats
path: root/audio/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/unix.c')
-rw-r--r--audio/unix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/audio/unix.c b/audio/unix.c
index bf0dad47..dcfe932d 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -1128,6 +1128,11 @@ static gboolean client_cb(GIOChannel *chan, GIOCondition cond, gpointer data)
debug("Audio API: %s <- %s", type, name);
+ if (msghdr->length != len) {
+ error("Invalid message: length mismatch");
+ goto failed;
+ }
+
switch (msghdr->name) {
case BT_GET_CAPABILITIES:
handle_getcapabilities_req(client,