/[linux-patches]/genpatches-2.6/historical/2.6.10/1120_moxa-overflow.patch
Gentoo

Contents of /genpatches-2.6/historical/2.6.10/1120_moxa-overflow.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download) (as text)
Sat Jun 11 23:16:54 2005 UTC (15 years, 1 month ago) by dsd
File MIME type: text/x-diff
File size: 510 byte(s)
Import historical releases
1 --- a/drivers/char/moxa.c 2005-01-05 09:37:08 -0500
2 +++ b/drivers/char/moxa.c 2005-01-05 09:38:38 -0500
3 @@ -1668,6 +1668,8 @@
4 return -EFAULT;
5 if(dltmp.cardno < 0 || dltmp.cardno >= MAX_BOARDS)
6 return -EINVAL;
7 + if(dltmp.len < 0 || dltmp.len > sizeof(moxaBuff))
8 + return -EINVAL;
9
10 switch(cmd)
11 {
12 @@ -2822,8 +2824,6 @@
13 void __iomem *baseAddr;
14 int i;
15
16 - if(len > sizeof(moxaBuff))
17 - return -EINVAL;
18 if(copy_from_user(moxaBuff, tmp, len))
19 return -EFAULT;
20 baseAddr = moxaBaseAddr[cardno];

  ViewVC Help
Powered by ViewVC 1.1.20