shell32: Silence buffer overflow compiler warnings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-11-26 17:31:53 +01:00
parent b3a38fef26
commit 6624cabbb7
1 changed files with 4 additions and 4 deletions

View File

@ -259,9 +259,9 @@ static LPITEMIDLIST _ILCreateCPanelApplet(LPCSTR name, LPCSTR displayName,
memcpy(pidl->mkid.abID, &tmp, 2+size0);
p = &((PIDLDATA*)pidl->mkid.abID)->u.cpanel;
strcpy(p->szName, name);
strcpy(p->szName+tmp.u.cpanel.offsDispName, displayName);
strcpy(p->szName+tmp.u.cpanel.offsComment, comment);
memcpy(p->szName, name, strlen(name) + 1);
memcpy(p->szName+tmp.u.cpanel.offsDispName, displayName, strlen(displayName) + 1);
memcpy(p->szName+tmp.u.cpanel.offsComment, comment, strlen(comment) + 1);
*(WORD*)((char*)pidl+(size+2)) = 0;
@ -1077,7 +1077,7 @@ static HRESULT WINAPI IShellExecuteHookA_fnExecute(IShellExecuteHookA *iface,
return E_INVALIDARG;
path[0] = '\"';
lstrcpyA(path+1, pcpanel->szName);
memcpy(path+1, pcpanel->szName, strlen(pcpanel->szName) + 1);
/* pass applet name to Control_RunDLL to distinguish between applets in one .cpl file */
lstrcatA(path, "\" ");