mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +00:00
Fix buffer overflow in lstrcpynW and lstrcpynA.
svn path=/trunk/; revision=17463
This commit is contained in:
@@ -91,10 +91,9 @@ lstrcpynA(
|
||||
|
||||
do
|
||||
{
|
||||
if ('\0' == (*d++ = *s++))
|
||||
{
|
||||
break;
|
||||
}
|
||||
if ('\0' == *s)
|
||||
break;
|
||||
*d++ = *s++;
|
||||
}
|
||||
while(1 != --iMaxLength);
|
||||
*d = '\0';
|
||||
@@ -239,10 +238,9 @@ lstrcpynW(
|
||||
|
||||
do
|
||||
{
|
||||
if (L'\0' == (*d++ = *s++))
|
||||
{
|
||||
break;
|
||||
}
|
||||
if (L'\0' == *s)
|
||||
break;
|
||||
*d++ = *s++;
|
||||
}
|
||||
while(1 != --iMaxLength);
|
||||
*d = L'\0';
|
||||
|
||||
Reference in New Issue
Block a user