patch-2.4.7 linux/net/socket.c
Next file: linux/net/sunrpc/svcsock.c
Previous file: linux/net/netsyms.c
Back to the patch index
Back to the overall index
- Lines: 12
- Date:
Thu Jul 19 18:11:13 2001
- Orig file:
v2.4.6/linux/net/socket.c
- Orig date:
Tue Jul 3 17:08:22 2001
diff -u --recursive --new-file v2.4.6/linux/net/socket.c linux/net/socket.c
@@ -841,8 +841,10 @@
/*
* Check protocol is in range
*/
- if(family<0 || family>=NPROTO)
+ if (family < 0 || family >= NPROTO)
return -EAFNOSUPPORT;
+ if (type < 0 || type >= SOCK_MAX)
+ return -EINVAL;
/* Compatibility.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)