summaryrefslogtreecommitdiffstats
path: root/hcid/dbus-test.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-10-13 09:05:55 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-10-13 09:05:55 +0000
commit08c055000e681ab545933c5cc09db735bc7783f4 (patch)
treef781dbc20164a386c0f40651c7ff6bd4dfa3fb8a /hcid/dbus-test.c
parent9e397e899dae2472b34cd37ecfa79a8af0f2d985 (diff)
Fix received length check for l2cap info response
Diffstat (limited to 'hcid/dbus-test.c')
-rw-r--r--hcid/dbus-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hcid/dbus-test.c b/hcid/dbus-test.c
index 7eed0f30..9a1a14e7 100644
--- a/hcid/dbus-test.c
+++ b/hcid/dbus-test.c
@@ -263,7 +263,7 @@ static gboolean l2raw_data_callback(GIOChannel *io, GIOCondition cond, struct au
if (cmd->code != L2CAP_INFO_RSP)
return TRUE;
- if (ret < expected) {
+ if (ret < L2CAP_CMD_HDR_SIZE + L2CAP_INFO_RSP_SIZE) {
error("Too little data for l2cap info response");
goto failed;
}