fixed an access violation in case of a script jump beyond the last entry
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3772 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
821fca5066
commit
75b4c66de6
1 changed files with 2 additions and 1 deletions
|
@ -1305,6 +1305,7 @@ int CEXEBuild::resolve_jump_int(const char *fn, int *a, int offs, int start, int
|
|||
{
|
||||
int jump = atoi(lname);
|
||||
int *skip_map = (int *) cur_instruction_entry_map->get();
|
||||
int maxoffs = cur_instruction_entry_map->getlen() / (int) sizeof(int);
|
||||
|
||||
int direction = 1;
|
||||
if (jump < 0)
|
||||
|
@ -1313,7 +1314,7 @@ int CEXEBuild::resolve_jump_int(const char *fn, int *a, int offs, int start, int
|
|||
for (; jump != 0; jump -= direction)
|
||||
{
|
||||
offs += direction;
|
||||
if (offs >= 0 && offs < cur_instruction_entry_map->getlen() * (int) sizeof(int))
|
||||
if (offs >= 0 && offs < maxoffs)
|
||||
{
|
||||
while (skip_map[offs])
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue