[SVCHOST]

Fix buffer overruns in LanaFlagIsSet() and SetLanaFlag().
Normally, i shouldn't be > 7, MAX_LANA is set to 254.

CID #1102306
CID #1102305

svn path=/trunk/; revision=62633
This commit is contained in:
Pierre Schweitzer 2014-04-05 21:27:12 +00:00
parent ece6628139
commit 849f7cf1d1

View file

@ -64,7 +64,7 @@ LanaFlagIsSet (
DWORD i = Lana / 32;
/* Clear the flag for this LANA */
return (i <= 8) ? LanaFlags[i] & (1 << (Lana - 32 * i)) : FALSE;
return (i <= 7) ? LanaFlags[i] & (1 << (Lana - 32 * i)) : FALSE;
}
VOID
@ -76,7 +76,7 @@ SetLanaFlag (
DWORD i = Lana / 32;
/* Set the flag for this LANA */
if (i <= 8) LanaFlags[i] |= 1 << (Lana - 32 * i);
if (i <= 7) LanaFlags[i] |= 1 << (Lana - 32 * i);
}
VOID