preproc: Workaround a usage after free bug
In some circumstantes this free is incorrect resulting in usage after-free. Workaround it by not freeing memory here. https://bugzilla.nasm.us/show_bug.cgi?id=3392414 gorcunov@: - slightly tuneup the comment Signed-off-by: Adam Majer <amajer@suse.de> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
parent
f9ec5bbd2a
commit
736be08cf3
1 changed files with 11 additions and 1 deletions
|
@ -5101,8 +5101,18 @@ static char *pp_getline(void)
|
|||
nasm_free(m->paramlen);
|
||||
l->finishes->in_progress = 0;
|
||||
}
|
||||
} else
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME It is incorrect to always free_mmacro here.
|
||||
* It leads to usage-after-free.
|
||||
*
|
||||
* https://bugzilla.nasm.us/show_bug.cgi?id=3392414
|
||||
*/
|
||||
#if 0
|
||||
else
|
||||
free_mmacro(m);
|
||||
#endif
|
||||
}
|
||||
istk->expansion = l->next;
|
||||
nasm_free(l);
|
||||
|
|
Loading…
Reference in a new issue