linamh/sys-kernel/win4lin-sources/files/win4lin-sources-2.4.26.CAN-2004-0535.patch
2022-11-19 21:49:12 +01:00

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(&regs, 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, &regs, regs_buff);
if(copy_to_user(addr, &regs, sizeof(regs)))
return -EFAULT;