|
From: Nicholas N. <nj...@so...> - 2020-12-02 05:21:52
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=d63b8ec7d423268296d8cd664c3fcee9126d24b8 commit d63b8ec7d423268296d8cd664c3fcee9126d24b8 Author: Nicholas Nethercote <nne...@mo...> Date: Wed Dec 2 16:21:23 2020 +1100 Add a comment to previous commit. Diff: --- shared/vg_replace_strmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/vg_replace_strmem.c b/shared/vg_replace_strmem.c index df61aa1327..423216ae18 100644 --- a/shared/vg_replace_strmem.c +++ b/shared/vg_replace_strmem.c @@ -1979,6 +1979,7 @@ static inline void my_exit ( int x ) /* pre-counting length... should be ok */ \ if (is_overlap(dst_orig, \ src_orig, \ + /* +4 because sizeof(wchar_t) == 4 */ \ (Addr)dst-(Addr)dst_orig+4, \ (Addr)src-(Addr)src_orig+4)) \ RECORD_OVERLAP_ERROR("wcscpy", dst_orig, src_orig, 0); \ |