mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Fix nullptr deref in yasm_expr__copy_except (#241)
This commit is contained in:
parent
721134a8ae
commit
0dfac4d4da
1 changed files with 4 additions and 1 deletions
|
|
@ -994,7 +994,10 @@ yasm_expr__copy_except(const yasm_expr *e, int except)
|
|||
{
|
||||
yasm_expr *n;
|
||||
int i;
|
||||
|
||||
|
||||
if (e == NULL)
|
||||
return NULL;
|
||||
|
||||
n = yasm_xmalloc(sizeof(yasm_expr) +
|
||||
sizeof(yasm_expr__item)*(e->numterms<2?0:e->numterms-2));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue