linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] missing copy_to_user check in pc300 wan driver
@ 2003-08-11 15:59 davej
  0 siblings, 0 replies; only message in thread
From: davej @ 2003-08-11 15:59 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/net/wan/pc300_drv.c linux-2.5/drivers/net/wan/pc300_drv.c
--- bk-linus/drivers/net/wan/pc300_drv.c	2003-08-04 01:00:28.000000000 +0100
+++ linux-2.5/drivers/net/wan/pc300_drv.c	2003-08-06 18:59:40.000000000 +0100
@@ -2623,7 +2623,8 @@ int cpc_ioctl(struct net_device *dev, st
 					       sizeof(struct net_device_stats));
 					if (card->hw.type == PC300_TE)
 						memcpy(&pc300stats.te_stats,&chan->falc,sizeof(falc_t));
-				    copy_to_user(arg, &pc300stats, sizeof(pc300stats_t));
+				    	if (copy_to_user(arg, &pc300stats, sizeof(pc300stats_t)))
+						return -EFAULT;
 				}
 				return 0;
 			}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-08-11 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-11 15:59 [PATCH] missing copy_to_user check in pc300 wan driver davej

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).