[programs/winedbg/memory.c] Strncpy elimination.
Peter Berg Larsen
pebl at math.ku.dk
Sun Mar 27 12:24:17 CST 2005
I have been checking the usage of strncpy, replacing where apropriate with
a memcpy or lstrcpyn[AW]. The first raw diff was 100kb, so there is bound
to be one or two slips. These are the first batch which I found to be
obvious, correct, and didnt need a special comment. Note with correct I
mean if there was a \0 bug before then it still there.
Changelog:
Janitorial Task: Check the usage of strncpy/strncpyW.
Index: programs/winedbg/memory.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/memory.c,v
retrieving revision 1.17
diff -u -r1.17 memory.c
--- programs/winedbg/memory.c 4 Mar 2005 12:33:34 -0000 1.17
+++ programs/winedbg/memory.c 26 Mar 2005 09:41:55 -0000
@@ -242,8 +242,7 @@
}
else
{
- strncpy(buffer, addr, size);
- buffer[size - 1] = 0;
+ lstrcpynA(buffer, addr, size);
}
return TRUE;
}
More information about the wine-patches
mailing list