From: Peter Johnson Date: Fri, 1 Jun 2007 19:44:38 +0000 (-0000) Subject: Don't try to yasm_expr_copy(NULL). X-Git-Tag: v0.6.1~1^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e604828b11984a597a2b357566e8422f2ae82ab;p=yasm Don't try to yasm_expr_copy(NULL). Found by: zzuf svn path=/trunk/yasm/; revision=1867 --- diff --git a/modules/objfmts/coff/coff-objfmt.c b/modules/objfmts/coff/coff-objfmt.c index 1df7c4cf..ae3ee08c 100644 --- a/modules/objfmts/coff/coff-objfmt.c +++ b/modules/objfmts/coff/coff-objfmt.c @@ -1844,7 +1844,7 @@ dir_setframe(yasm_object *object, yasm_valparamhead *valparams, code->loc = get_curpos(object, "SETFRAME", line); code->opcode = UWOP_SET_FPREG; code->info = (unsigned int)(*reg & 0xF); - yasm_value_initialize(&code->off, yasm_expr_copy(off), 8); + yasm_value_initialize(&code->off, off ? yasm_expr_copy(off) : NULL, 8); SLIST_INSERT_HEAD(&objfmt_coff->unwind->codes, code, link); }