fixed bug #1616267 - System plugin crash with parenthesis in filename
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4844 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ae3373311e
commit
2cda34fbec
1 changed files with 17 additions and 1 deletions
|
@ -139,6 +139,12 @@ PLUGINFUNCTION(Debug)
|
|||
PLUGINFUNCTION(Get)
|
||||
{
|
||||
SystemProc *proc = PrepareProc(FALSE);
|
||||
if (proc == NULL)
|
||||
{
|
||||
pushstring("error");
|
||||
return;
|
||||
}
|
||||
|
||||
SYSTEM_LOG_ADD("Get ");
|
||||
SYSTEM_LOG_ADD(proc->DllName);
|
||||
SYSTEM_LOG_ADD("::");
|
||||
|
@ -169,6 +175,9 @@ PLUGINFUNCTION(Call)
|
|||
{
|
||||
// Prepare input
|
||||
SystemProc *proc = PrepareProc(TRUE);
|
||||
if (proc == NULL)
|
||||
return;
|
||||
|
||||
SYSTEM_LOG_ADD("Call ");
|
||||
SYSTEM_LOG_ADD(proc->DllName);
|
||||
SYSTEM_LOG_ADD("::");
|
||||
|
@ -320,6 +329,13 @@ SystemProc *PrepareProc(BOOL NeedForCall)
|
|||
// Check for Section Change
|
||||
BOOL changed = TRUE;
|
||||
ChangesDone = SectionType;
|
||||
|
||||
if (SectionType != PST_PROC && proc == NULL)
|
||||
// no proc after PST_PROC is done means something is wrong with
|
||||
// the call syntax and we'll get a crash because everything needs
|
||||
// proc from here on.
|
||||
break;
|
||||
|
||||
switch (*ib)
|
||||
{
|
||||
case 0x0: SectionType = -1; break;
|
||||
|
@ -640,7 +656,7 @@ SystemProc *PrepareProc(BOOL NeedForCall)
|
|||
GlobalFree(sbuf);
|
||||
|
||||
// Ok, the final step: check proc for existance
|
||||
if (proc->Proc == NULL)
|
||||
if (proc != NULL && proc->Proc == NULL)
|
||||
{
|
||||
switch (proc->ProcType)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue