mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 05:00:27 +00:00
[NETAPI32] Fix array index use before limits check. By Kudratov Olimjon using Cppcheck. CORE-8978
svn path=/trunk/; revision=67965
This commit is contained in:
parent
0e02eb304d
commit
8b64c9ce1f
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ static int NetBTNameEncode(const UCHAR *p, UCHAR *buffer)
|
|||
if (!buffer) return 0;
|
||||
|
||||
buffer[len++] = NCBNAMSZ * 2;
|
||||
for (i = 0; p[i] && i < NCBNAMSZ; i++)
|
||||
for (i = 0; i < NCBNAMSZ && p[i]; i++)
|
||||
{
|
||||
buffer[len++] = ((p[i] & 0xf0) >> 4) + 'A';
|
||||
buffer[len++] = (p[i] & 0x0f) + 'A';
|
||||
|
|
Loading…
Reference in a new issue