Author: pschweitzer
Date: Wed Sep 21 16:10:32 2011
New Revision: 53788
URL:
http://svn.reactos.org/svn/reactos?rev=53788&view=rev
Log:
[HAL/x86]
Fix buffer overruns
Modified:
trunk/reactos/hal/halx86/generic/usage.c
trunk/reactos/hal/halx86/legacy/bussupp.c
Modified: trunk/reactos/hal/halx86/generic/usage.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/usage.c…
==============================================================================
--- trunk/reactos/hal/halx86/generic/usage.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/generic/usage.c [iso-8859-1] Wed Sep 21 16:10:32 2011
@@ -323,7 +323,7 @@
while (TRUE)
{
/* Check for valid vector number */
- if (i <= MAXIMUM_IDTVECTOR)
+ if (i < MAXIMUM_IDTVECTOR)
{
/* Check if this entry should be parsed */
if ((HalpIDTUsageFlags[i].Flags & FlagMatch))
Modified: trunk/reactos/hal/halx86/legacy/bussupp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/bussupp.…
==============================================================================
--- trunk/reactos/hal/halx86/legacy/bussupp.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/legacy/bussupp.c [iso-8859-1] Wed Sep 21 16:10:32 2011
@@ -721,7 +721,7 @@
SubClassName += 5;
p = strchr(SubClassName, '\r');
Length = p - SubClassName;
- if (Length > sizeof(bSubClassName)) Length = sizeof(bSubClassName);
+ if (Length > sizeof(bSubClassName)) Length = sizeof(bSubClassName) - 1;
strncpy(bSubClassName, SubClassName, Length);
bSubClassName[Length] = '\0';
}