check overflow correctly.
This commit is contained in:
parent
c4819d8ab2
commit
3f5117d020
@ -233,7 +233,7 @@ Yap_GetFromArena(Term *arenap, UInt cells, UInt arity)
|
|||||||
H += cells;
|
H += cells;
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
if (base+cells > ASP-1024) {
|
if (base+cells > max-1024) {
|
||||||
if (!GrowArena(arena, max, old_sz, old_sz+sizeof(CELL)*1024, arity))
|
if (!GrowArena(arena, max, old_sz, old_sz+sizeof(CELL)*1024, arity))
|
||||||
return NULL;
|
return NULL;
|
||||||
goto restart;
|
goto restart;
|
||||||
|
Reference in New Issue
Block a user