check for overflow in big strings

This commit is contained in:
Vitor Santos Costa
2012-10-16 08:44:26 +01:00
parent ba866a36e2
commit 610ca06883
2 changed files with 6 additions and 2 deletions

View File

@@ -560,6 +560,10 @@ ParseTerm(int prio, JMPBUFF *FailBuff USES_REGS)
t = MkAtomTerm(Yap_LookupWideAtom(p));
else
t = Yap_WideStringToList(p);
if (t == 0L) {
LOCAL_ErrorMessage = "Stack Overflow";
FAIL;
}
NextToken;
}
break;