mirror of
https://github.com/yasm/yasm
synced 2026-08-26 22:26:05 -04:00
Fix null-pointer-dereference in yasm_expr_get_intnum (#244)
This commit is contained in:
parent
ecb47f1c87
commit
9defefae9f
1 changed files with 1 additions and 1 deletions
|
|
@ -1264,7 +1264,7 @@ yasm_expr_get_intnum(yasm_expr **ep, int calc_bc_dist)
|
|||
{
|
||||
*ep = yasm_expr_simplify(*ep, calc_bc_dist);
|
||||
|
||||
if ((*ep)->op == YASM_EXPR_IDENT && (*ep)->terms[0].type == YASM_EXPR_INT)
|
||||
if (*ep && (*ep)->op == YASM_EXPR_IDENT && (*ep)->terms[0].type == YASM_EXPR_INT)
|
||||
return (*ep)->terms[0].data.intn;
|
||||
else
|
||||
return (yasm_intnum *)NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue