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