Consolidate all token length limits (1024), including one bad one (80) hardcoded on the stack (issue #40, issue #41).

This commit is contained in:
John Kessenich 2015-07-25 14:02:53 -06:00
parent 1070e629a9
commit f330f08129
9 changed files with 74 additions and 23 deletions

View file

@ -196,7 +196,7 @@ int TPpContext::ReadToken(TokenStream *pTok, TPpToken *ppToken)
len = 0;
ch = lReadByte(pTok);
while (ch != 0) {
if (len < TPpToken::maxTokenLength) {
if (len < MaxTokenLength) {
tokenText[len] = (char)ch;
len++;
ch = lReadByte(pTok);