diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragmentRoot.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragmentRoot.java index d0a0790c0ca..f331d97f3d2 100644 --- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragmentRoot.java +++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JarPackageFragmentRoot.java @@ -151,6 +151,9 @@ protected boolean computeChildren(OpenableElementInfo info, IResource underlying for (Enumeration e= jar.entries(); e.hasMoreElements();) { ZipEntry member= e.nextElement(); String name = member.getName(); + if (name.contains("..")) { //$NON-NLS-1$ + throw new IllegalArgumentException("Bad zip entry: "+name+" in "+jar.getName()); //$NON-NLS-1$ //$NON-NLS-2$ + } if (this.multiVersion && name.length() > (length + 2) && name.startsWith(version)) { int end = name.indexOf('/', length); if (end >= name.length()) continue;