View | Details | Raw Unified | Return to bug 74519
Collapse All | Expand All

(-)linux-2.4.21/net/bluetooth/af_bluetooth.c.xx (-3 / +3 lines)
Lines 62-68 Link Here
62
62
63
int bluez_sock_register(int proto, struct net_proto_family *ops)
63
int bluez_sock_register(int proto, struct net_proto_family *ops)
64
{
64
{
65
	if (proto >= BLUEZ_MAX_PROTO)
65
	if ((proto < 0) || (proto >= BLUEZ_MAX_PROTO))
66
		return -EINVAL;
66
		return -EINVAL;
67
67
68
	if (bluez_proto[proto])
68
	if (bluez_proto[proto])
Lines 74-80 Link Here
74
74
75
int bluez_sock_unregister(int proto)
75
int bluez_sock_unregister(int proto)
76
{
76
{
77
	if (proto >= BLUEZ_MAX_PROTO)
77
	if ((proto < 0) || (proto >= BLUEZ_MAX_PROTO))
78
		return -EINVAL;
78
		return -EINVAL;
79
79
80
	if (!bluez_proto[proto])
80
	if (!bluez_proto[proto])
Lines 86-92 Link Here
86
86
87
static int bluez_sock_create(struct socket *sock, int proto)
87
static int bluez_sock_create(struct socket *sock, int proto)
88
{
88
{
89
	if (proto >= BLUEZ_MAX_PROTO)
89
	if ((proto < 0) || (proto >= BLUEZ_MAX_PROTO))
90
		return -EINVAL;
90
		return -EINVAL;
91
91
92
#if defined(CONFIG_KMOD)
92
#if defined(CONFIG_KMOD)

Return to bug 74519