Re: [PATCH] msvcrt: Fix strcpy implementation so it works on overlapping buffers
5 Aug
2017
5 Aug
'17
4:21 p.m.
On Aug 5, 2017, at 10:43 AM, Piotr Caban <piotr(a)codeweavers.com> wrote:
+char* CDECL MSVCRT_strcpy(char *dst, const char *src) +{ + char *ret = dst; + + while(1) { + *dst = *src; + if (!*src) break; + src++; + *dst++;
What's the dereference for?
+ } + + return ret; +}
-Ken
5 Aug
5 Aug
4:23 p.m.
New subject: [PATCH] msvcrt: Fix strcpy implementation so it works on overlapping buffers
On 08/05/17 18:21, Ken Thomases wrote:
On Aug 5, 2017, at 10:43 AM, Piotr Caban <piotr(a)codeweavers.com> wrote:
+char* CDECL MSVCRT_strcpy(char *dst, const char *src) +{ + char *ret = dst; + + while(1) { + *dst = *src; + if (!*src) break; + src++; + *dst++;
What's the dereference for? My bad, thanks for spotting it. I've sent a fixed version.
Thanks, Piotr
3054
Age (days ago)
3054
Last active (days ago)
1 comments
2 participants
participants (2)
-
Ken Thomases -
Piotr Caban