diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-12-19 19:41:39 -0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-12-20 00:58:49 +0200 |
commit | c4596b6ceb562f5bd0ac985e4764517f36e25642 (patch) | |
tree | 127598f4871fcf2f15ec1fd0b3a5bfc1b1c516d3 /audio | |
parent | ef91427a2e37aff89b997cff0b74e8ccb1140082 (diff) |
Be more strict about message size mismatches.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/unix.c | 5 |
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, |