patch-2.3.4 linux/fs/select.c
Next file: linux/fs/stat.c
Previous file: linux/fs/open.c
Back to the patch index
Back to the overall index
- Lines: 14
- Date:
Sun May 23 23:53:45 1999
- Orig file:
v2.3.3/linux/fs/select.c
- Orig date:
Fri May 14 18:55:26 1999
diff -u --recursive --new-file v2.3.3/linux/fs/select.c linux/fs/select.c
@@ -267,8 +267,12 @@
}
ret = -EINVAL;
- if (n < 0 || n > KFDS_NR)
+ if (n < 0)
goto out_nofds;
+
+ if (n > KFDS_NR)
+ n = KFDS_NR;
+
/*
* We need 6 bitmaps (in/out/ex for both incoming and outgoing),
* since we used fdset we need to allocate memory in units of
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)