patch-2.4.7 linux/drivers/char/drm/ioctl.c

Next file: linux/drivers/char/drm/mga_bufs.c
Previous file: linux/drivers/char/drm/i810_dma.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/drivers/char/drm/ioctl.c linux/drivers/char/drm/ioctl.c
@@ -82,7 +82,7 @@
 	if (copy_from_user(&u, (drm_unique_t *)arg, sizeof(u)))
 		return -EFAULT;
 
-	if (!u.unique_len)
+	if (!u.unique_len || u.unique_len > 1024)
 		return -EINVAL;
 	
 	dev->unique_len = u.unique_len;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)