mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
Fix buffer overflow in lstrcpynW and lstrcpynA.
svn path=/trunk/; revision=17463
This commit is contained in:
parent
10cd89fb4e
commit
dc4c46f7cc
1 changed files with 6 additions and 8 deletions
|
@ -91,10 +91,9 @@ lstrcpynA(
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if ('\0' == (*d++ = *s++))
|
if ('\0' == *s)
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
*d++ = *s++;
|
||||||
}
|
}
|
||||||
while(1 != --iMaxLength);
|
while(1 != --iMaxLength);
|
||||||
*d = '\0';
|
*d = '\0';
|
||||||
|
@ -239,10 +238,9 @@ lstrcpynW(
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (L'\0' == (*d++ = *s++))
|
if (L'\0' == *s)
|
||||||
{
|
|
||||||
break;
|
break;
|
||||||
}
|
*d++ = *s++;
|
||||||
}
|
}
|
||||||
while(1 != --iMaxLength);
|
while(1 != --iMaxLength);
|
||||||
*d = L'\0';
|
*d = L'\0';
|
||||||
|
|
Loading…
Reference in a new issue