check overflow while copying constraints.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@471 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-05-15 03:41:19 +00:00
parent 86e4a99d73
commit 92fe2d5c9f

View File

@ -879,7 +879,10 @@ static CELL *MkDBTerm(register CELL *pt0, register CELL *pt0_end,
*ConstraintsBottom = new;
ConstraintsBottom = RepAppl(new)+4;
}
memcpy((void *)(H), (void *)(to_visit_base), sz*sizeof(CELL *));
if (H+sz >= ASP) {
goto error2;
}
memcpy((void *)H, (void *)(to_visit_base), sz*sizeof(CELL *));
to_visit_base = (CELL **)H;
to_visit = to_visit_base+sz;
}