Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-04-08 08:23:22 +0000
committerMarkus Schorn2008-04-08 08:23:22 +0000
commit7520c8821b0bd79cd7f9757ddaa8342b73a1069a (patch)
tree3fcb4bcffba1626271d66cd5a0c41bc558ae0347 /core/org.eclipse.cdt.core
parent7fd9e1e281a1549deb27546a71e6a279485df142 (diff)
downloadorg.eclipse.cdt-7520c8821b0bd79cd7f9757ddaa8342b73a1069a.tar.gz
org.eclipse.cdt-7520c8821b0bd79cd7f9757ddaa8342b73a1069a.tar.xz
org.eclipse.cdt-7520c8821b0bd79cd7f9757ddaa8342b73a1069a.zip
Guard against a potential endless loop.
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java
index 83a29fe464..1cc6a59a9c 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java
@@ -418,7 +418,8 @@ public class ASTTypeUtil {
IType[] types = new IType[DEAULT_ITYPE_SIZE];
// push all of the types onto the stack
- while (type != null) {
+ int i=0;
+ while(type != null && ++i<100) {
final boolean isTypedef= type instanceof ITypedef;
if (!resolveTypedefs || !isTypedef) {
types = (IType[]) ArrayUtil.append(IType.class, types, type);

Back to the top