Author: pschweitzer
Date: Wed Sep 21 16:15:16 2011
New Revision: 53789
URL:
http://svn.reactos.org/svn/reactos?rev=53789&view=rev
Log:
[HAL/x86]
Completely fix one of the overruns
Modified:
trunk/reactos/hal/halx86/legacy/bussupp.c
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:15:16 2011
@@ -721,7 +721,7 @@
SubClassName += 5;
p = strchr(SubClassName, '\r');
Length = p - SubClassName;
- if (Length > sizeof(bSubClassName)) Length = sizeof(bSubClassName) - 1;
+ if (Length >= sizeof(bSubClassName)) Length = sizeof(bSubClassName) - 1;
strncpy(bSubClassName, SubClassName, Length);
bSubClassName[Length] = '\0';
}