patch-2.4.5 linux/drivers/char/agp/agpgart_fe.c
Next file: linux/drivers/char/drm/ffb_drv.c
Previous file: linux/drivers/char/advantechwdt.c
Back to the patch index
Back to the overall index
- Lines: 10
- Date:
Tue May 15 01:29:34 2001
- Orig file:
v2.4.4/linux/drivers/char/agp/agpgart_fe.c
- Orig date:
Wed Apr 11 19:02:30 2001
diff -u --recursive --new-file v2.4.4/linux/drivers/char/agp/agpgart_fe.c linux/drivers/char/agp/agpgart_fe.c
@@ -852,6 +852,9 @@
if (copy_from_user(&reserve, (void *) arg, sizeof(agp_region))) {
return -EFAULT;
}
+ if ((unsigned) reserve.seg_count >= ~0U/sizeof(agp_segment))
+ return -EFAULT;
+
client = agp_find_client_by_pid(reserve.pid);
if (reserve.seg_count == 0) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)