diff options
author | John Camelon | 2004-04-15 18:51:16 +0000 |
---|---|---|
committer | John Camelon | 2004-04-15 18:51:16 +0000 |
commit | ce4bd0a14125930a0dc9d2a03f9ecff48b58e253 (patch) | |
tree | 5b4674964b665412e3c68f54727c73500b9827aa /core | |
parent | e50848b1766469509c80782229986ea06b6edb0f (diff) | |
download | org.eclipse.cdt-ce4bd0a14125930a0dc9d2a03f9ecff48b58e253.tar.gz org.eclipse.cdt-ce4bd0a14125930a0dc9d2a03f9ecff48b58e253.tar.xz org.eclipse.cdt-ce4bd0a14125930a0dc9d2a03f9ecff48b58e253.zip |
Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58175
Diffstat (limited to 'core')
-rw-r--r-- | core/org.eclipse.cdt.core/parser/ChangeLog-parser | 3 | ||||
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/ChangeLog-parser b/core/org.eclipse.cdt.core/parser/ChangeLog-parser index 38091c7082b..7e3af0e43fe 100644 --- a/core/org.eclipse.cdt.core/parser/ChangeLog-parser +++ b/core/org.eclipse.cdt.core/parser/ChangeLog-parser @@ -1,3 +1,6 @@ +2004-04-15 John Camelon + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=58175 + 2004-04-15 Andrew Niefer fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=57791 - Parser infinite loop diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java index 0bb0674a7ec..f12e764d2e3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/Scanner.java @@ -1393,7 +1393,11 @@ public class Scanner implements IScanner { handleInvalidCompletion(); return null; } - handleProblem( IProblem.PREPROCESSOR_POUND_ERROR, getRestOfPreprocessorLine(), beginningOffset, false, true ); + String restOfErrorLine = getRestOfPreprocessorLine(); + if( isLimitReached() ) + handleInvalidCompletion(); + + handleProblem( IProblem.PREPROCESSOR_POUND_ERROR, restOfErrorLine, beginningOffset, false, true ); return null; case PreprocessorDirectives.PRAGMA : @@ -2522,6 +2526,9 @@ public class Scanner implements IScanner { int baseOffset = lastContext.getOffset() - lastContext.undoStackSize(); int nameLine = scannerData.getContextStack().getCurrentLineNumber(); String includeLine = getRestOfPreprocessorLine(); + if( isLimitReached() ) + handleInvalidCompletion(); + int endLine = scannerData.getContextStack().getCurrentLineNumber(); ScannerUtility.InclusionDirective directive = null; |