get_full_path_helper and Valgrind
Francois Gouget
fgouget at codeweavers.com
Wed Nov 26 19:18:09 CST 2003
Changelog:
* dlls/ntdll/path.c
Francois Gouget <fgouget at codeweavers.com>
Only convert '/'s to '\\'s up to the '\0' as the rest of the buffer
may not be initialized (found by Valgrind).
--
Francois Gouget
fgouget at codeweavers.com
-------------- next part --------------
Index: dlls/ntdll/path.c
===================================================================
RCS file: /home/cvs/wine/dlls/ntdll/path.c,v
retrieving revision 1.12
diff -u -r1.12 path.c
--- dlls/ntdll/path.c 20 Nov 2003 23:44:13 -0000 1.12
+++ dlls/ntdll/path.c 27 Nov 2003 01:07:45 -0000
@@ -478,7 +478,7 @@
strcatW(buffer, name);
/* convert every / into a \ */
- for (ptr = buffer; ptr < buffer + size / sizeof(WCHAR); ptr++)
+ for (ptr = buffer; *ptr != '\0'; ptr++)
if (*ptr == '/') *ptr = '\\';
reqsize -= sizeof(WCHAR); /* don't count trailing \0 */
More information about the wine-patches
mailing list