summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-08 17:50:14 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-08 17:50:14 -0800
commit979ce809bab37cf438f0db22bfa732d01a84a8c2 (patch)
tree406fd7f1731c51c2a2735c08d327f2f16a853ebe
parent7a2fe8c49f0f346601a18c69ba0f75227c0c5993 (diff)
parent1efa3c05f8640c37ba89d54dfaa18504d21986ce (diff)
downloadop-kernel-dev-979ce809bab37cf438f0db22bfa732d01a84a8c2.zip
op-kernel-dev-979ce809bab37cf438f0db22bfa732d01a84a8c2.tar.gz
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NET] compat ifconf: fix limits
-rw-r--r--fs/compat_ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 537ac70..c666769 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -446,7 +446,7 @@ static int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg)
ifr = ifc.ifc_req;
ifr32 = compat_ptr(ifc32.ifcbuf);
for (i = 0, j = 0;
- i + sizeof (struct ifreq32) < ifc32.ifc_len && j < ifc.ifc_len;
+ i + sizeof (struct ifreq32) <= ifc32.ifc_len && j < ifc.ifc_len;
i += sizeof (struct ifreq32), j += sizeof (struct ifreq)) {
if (copy_in_user(ifr32, ifr, sizeof (struct ifreq32)))
return -EFAULT;
OpenPOWER on IntegriCloud