From e33af2c8698c99df7630b756b48c80120591eed0 Mon Sep 17 00:00:00 2001 From: Nelson Ferreira Date: Thu, 15 Sep 2011 22:59:24 -0400 Subject: [PATCH] Allocate and copy ures when it would be the return address. CID:200 Signed-off-by: Nelson Ferreira --- modules/ase/ase-interval.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/ase/ase-interval.c b/modules/ase/ase-interval.c index 83aadcc..b832264 100644 --- a/modules/ase/ase-interval.c +++ b/modules/ase/ase-interval.c @@ -1997,7 +1997,12 @@ _ase_subtract_intv_union(ase_interval_t a, ase_interval_union_item_t u) break; u = u->next; } - + if (na == &ures) { + /* Copy the local temporary to the heap */ + na = xnew(struct ase_interval_union_item_s); + assert(na); + memcpy(na,ures,sizeof(ures)); + } return na; } -- 2.25.1