Fix buffer overflow in lstrcpynW and lstrcpynA.

svn path=/trunk/; revision=17463
This commit is contained in:
Filip Navara 2005-08-21 15:51:23 +00:00
parent 10cd89fb4e
commit dc4c46f7cc

View file

@ -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';