mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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
|
||||
{
|
||||
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';
|
||||
|
|
Loading…
Reference in a new issue