OSDN Git Service

Fix possible array out of bounds.
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>
Tue, 21 Jul 2009 19:00:50 +0000 (16:00 -0300)
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>
Tue, 21 Jul 2009 20:11:13 +0000 (17:11 -0300)
test/hciemu.c

index ac0a996..3d5a366 100644 (file)
@@ -518,7 +518,7 @@ static void disconnect(uint8_t *data)
 
        handle = btohs(cp->handle);
 
-       if (handle - 1 > VHCI_MAX_CONN)
+       if (handle > VHCI_MAX_CONN)
                return;
 
        if (!(conn = vconn[handle-1]))