diff -Naur affix-kernel-3.2.0-old/btcore/hci.c affix-kernel-3.2.0/btcore/hci.c --- affix-kernel-3.2.0-old/btcore/hci.c 2004-07-29 14:44:58.000000000 +0300 +++ affix-kernel-3.2.0/btcore/hci.c 2005-04-22 14:58:33.000000000 +0300 @@ -2148,7 +2148,7 @@ int affix_sock_register(struct net_proto_family *pf, int protocol) { - if (protocol >= BTPROTO_MAX) + if ((protocol <0) || (protocol >= BTPROTO_MAX)) return -EINVAL; if (btprotos[protocol]) return -EEXIST; @@ -2169,7 +2169,7 @@ int affix_sock_unregister(int protocol) { - if (protocol >= BTPROTO_MAX) + if ((protocol <0) || (protocol >= BTPROTO_MAX)) return -EINVAL; btprotos[protocol] = NULL; return 0; @@ -2180,7 +2180,7 @@ int i; DBFENTER; - if (protocol >= BTPROTO_MAX) + if ((protocol <0) || (protocol >= BTPROTO_MAX)) return -EPROTONOSUPPORT; if (btprotos[protocol] == NULL) { if (protocol == BTPROTO_RFCOMM)