13 lines
476 B
Diff
13 lines
476 B
Diff
--- 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;
|