From 08c055000e681ab545933c5cc09db735bc7783f4 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 13 Oct 2006 09:05:55 +0000 Subject: Fix received length check for l2cap info response --- hcid/dbus-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hcid/dbus-test.c') 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; } -- cgit