[HAL/x86]

Completely fix one of the overruns

svn path=/trunk/; revision=53789
This commit is contained in:
Pierre Schweitzer 2011-09-21 16:15:16 +00:00
parent 87d6daee6c
commit ac92a8adf9

View file

@ -721,7 +721,7 @@ HalpDebugPciDumpBus(IN ULONG i,
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';
}