blob: 669fc5fd32fb5ddc6f38d5b17f5654bb8148c30e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
--- drivers/net/e1000/e1000_ethtool.c 2003-06-13 15:51:34.000000000 +0100
+++ drivers/net/e1000/e1000_ethtool.c.plasmaroo 2004-06-24 11:23:32.524963976 +0100
@@ -468,6 +468,9 @@
if(copy_from_user(®s, addr, sizeof(regs)))
return -EFAULT;
+ memset(regs_buff, 0, sizeof(regs_buff));
+ if (regs.len > E1000_REGS_LEN)
+ regs.len = E1000_REGS_LEN;
e1000_ethtool_gregs(adapter, ®s, regs_buff);
if(copy_to_user(addr, ®s, sizeof(regs)))
return -EFAULT;
|