lkml.org 
[lkml]   [2003]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] missing copy_to_user check in pc300 wan driver
Date
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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.030 / U:3.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site