[jboss-cvs] JBossAS SVN: r58520 - projects/microcontainer/trunk/container/src/main/org/jboss/virtual
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Nov 18 00:36:52 EST 2006
Author: scott.stark at jboss.org
Date: 2006-11-18 00:36:50 -0500 (Sat, 18 Nov 2006)
New Revision: 58520
Modified:
projects/microcontainer/trunk/container/src/main/org/jboss/virtual/VFSUtils.java
Log:
Guard against string out of bounds when inner jar cp manifests are scanned.
Modified: projects/microcontainer/trunk/container/src/main/org/jboss/virtual/VFSUtils.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/virtual/VFSUtils.java 2006-11-18 03:49:10 UTC (rev 58519)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/virtual/VFSUtils.java 2006-11-18 05:36:50 UTC (rev 58520)
@@ -145,6 +145,9 @@
{
URL libURL = new URL(parentURL, path);
String libPath = libURL.getPath();
+ // TODO, this occurs for inner jars. Doubtful that such a mf cp is valid
+ if( rootPathLength > libPath.length() )
+ throw new IOException("Invalid rootPath: "+vfsRootURL+", libPath: "+libPath);
String vfsLibPath = libPath.substring(rootPathLength);
VirtualFile vf = file.getVFS().findChild(vfsLibPath);
paths.add(vf);
More information about the jboss-cvs-commits
mailing list