summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-12-19 19:41:39 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-12-20 00:58:49 +0200
commitc4596b6ceb562f5bd0ac985e4764517f36e25642 (patch)
tree127598f4871fcf2f15ec1fd0b3a5bfc1b1c516d3 /audio
parentef91427a2e37aff89b997cff0b74e8ccb1140082 (diff)
Be more strict about message size mismatches.
Diffstat (limited to 'audio')
-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,