Fix buffer overflow in lstrcpynW and lstrcpynA.
Modified: trunk/reactos/lib/kernel32/string/lstring.c
_____
Modified: trunk/reactos/lib/kernel32/string/lstring.c
--- trunk/reactos/lib/kernel32/string/lstring.c 2005-08-21 15:38:47 UTC
(rev 17462)
+++ trunk/reactos/lib/kernel32/string/lstring.c 2005-08-21 15:51:23 UTC
(rev 17463)
@@ -91,10 +91,9 @@
do
{
- if ('\0' == (*d++ = *s++))
- {
- break;
- }
+ if ('\0' == *s)
+ break;
+ *d++ = *s++;
}
while(1 != --iMaxLength);
*d = '\0';
@@ -239,10 +238,9 @@
do
{
- if (L'\0' == (*d++ = *s++))
- {
- break;
- }
+ if (L'\0' == *s)
+ break;
+ *d++ = *s++;
}
while(1 != --iMaxLength);
*d = L'\0';
Show replies by date