Sync to Wine-20050419:
Peter Berg Larsen <pebl(a)math.ku.dk>
- Replace strncpy with memcpy or lstrcpyn.
Jakob Eriksson <jakov(a)vmlinux.org>
- Get rid of HeapAlloc casts.
Modified: trunk/reactos/lib/oledlg/insobjdlg.c
_____
Modified: trunk/reactos/lib/oledlg/insobjdlg.c
--- trunk/reactos/lib/oledlg/insobjdlg.c 2005-05-05 18:29:41 UTC
(rev 15011)
+++ trunk/reactos/lib/oledlg/insobjdlg.c 2005-05-05 18:32:46 UTC
(rev 15012)
@@ -375,7 +375,7 @@
len = MAX_PATH;
if (ERROR_SUCCESS == RegQueryValueA(hkey, NULL, keydesc, &len))
{
- CLSID* lpclsid = (CLSID*) HeapAlloc(GetProcessHeap(), 0,
sizeof(CLSID));
+ CLSID* lpclsid = HeapAlloc(GetProcessHeap(), 0, sizeof(CLSID));
memcpy(lpclsid, &clsid, sizeof(CLSID));
len = SendMessageA(pdlgInfo->hwndObjTypeLB, LB_ADDSTRING, 0,
(LPARAM)keydesc);
@@ -479,7 +479,7 @@
WCHAR wcsFile[MAX_PATH];
SendMessageA(pdlgInfo->hwndFileTB, WM_GETTEXT, (WPARAM)MAX_PATH,
(LPARAM)fname);
- strncpy(pdlgInfo->lpOleUIInsertObject->lpszFile, fname,
pdlgInfo->lpOleUIInsertObject->cchFile);
+ lstrcpynA(pdlgInfo->lpOleUIInsertObject->lpszFile, fname,
pdlgInfo->lpOleUIInsertObject->cchFile);
RtlMultiByteToUnicodeN(wcsFile, MAX_PATH, NULL, fname, MAX_PATH);
if (ERROR_SUCCESS == (hres = GetClassFile(wcsFile,
&pdlgInfo->lpOleUIInsertObject->clsid)))
Show replies by date