tags 307167 patch thanks Patch attached.
Moritz
diff -Naur affix-kernel-2.1.1.orig/btcore/hci.c affix-kernel-2.1.1/btcore/hci.c --- affix-kernel-2.1.1.orig/btcore/hci.c 2003-12-19 15:29:20.000000000 +0100 +++ affix-kernel-2.1.1/btcore/hci.c 2005-05-05 17:30:00.000000000 +0200 @@ -2195,7 +2195,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; @@ -2216,7 +2216,7 @@ int affix_sock_unregister(int protocol) { - if (protocol >= BTPROTO_MAX) + if ((protocol < 0) || (protocol >= BTPROTO_MAX)) return -EINVAL; btprotos[protocol] = NULL; return 0; @@ -2227,7 +2227,7 @@ int i; DBFENTER; - if (protocol >= BTPROTO_MAX) + if ((protocol < 0) || (protocol >= BTPROTO_MAX)) return -EPROTONOSUPPORT; if (btprotos[protocol] == NULL) { if (protocol == BTPROTO_RFCOMM)