validate shortcut target, if it turns up as a valid path spec (URLs should still work)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2989 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-10-02 12:03:05 +00:00
parent 649a512324
commit eae737d71a

View file

@ -978,7 +978,7 @@ static int NSISCALL ExecuteEntry(entry *entry_)
case EW_CREATESHORTCUT:
{
char *buf2=GetStringFromParm(-0x20);
char *buf1=GetStringFromParm(0x11);
char *buf1=GetStringFromParm(-0x11);
char *buf0=GetStringFromParm(0x02);
char *buf3=GetStringFromParm(-0x33);
char *buf4=GetStringFromParm(0x45);
@ -986,6 +986,9 @@ static int NSISCALL ExecuteEntry(entry *entry_)
HRESULT hres;
IShellLink* psl;
if (!validpathspec(buf1))
GetStringFromParm(0x11);
log_printf8("CreateShortCut: out: \"%s\", in: \"%s %s\", icon: %s,%d, sw=%d, hk=%d",
buf2,buf1,buf0,buf3,parm4&0xff,(parm4&0xff00)>>8,parm4>>16);
@ -1009,7 +1012,8 @@ static int NSISCALL ExecuteEntry(entry *entry_)
if (SUCCEEDED(hres))
{
WCHAR wsz[1024];
static WCHAR wsz[1024];
wsz[0]=0;
MultiByteToWideChar(CP_ACP, 0, buf2, -1, wsz, 1024);
hres=ppf->lpVtbl->Save(ppf,(const WCHAR*)wsz,TRUE);
}