Author: pschweitzer
Date: Sat Apr 5 21:27:12 2014
New Revision: 62633
URL:
http://svn.reactos.org/svn/reactos?rev=62633&view=rev
Log:
[SVCHOST]
Fix buffer overruns in LanaFlagIsSet() and SetLanaFlag().
Normally, i shouldn't be > 7, MAX_LANA is set to 254.
CID #1102306
CID #1102305
Modified:
trunk/reactos/base/services/svchost/netbios.c
Modified: trunk/reactos/base/services/svchost/netbios.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/svchost/netb…
==============================================================================
--- trunk/reactos/base/services/svchost/netbios.c [iso-8859-1] (original)
+++ trunk/reactos/base/services/svchost/netbios.c [iso-8859-1] Sat Apr 5 21:27:12 2014
@@ -64,7 +64,7 @@
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 @@
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