Browse Source

bugzilla 44731: index out of bound in globmapper (due to overlap)

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@644043 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 17 years ago
parent
commit
ee2509159b
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/main/org/apache/tools/ant/util/GlobPatternMapper.java

+ 3
- 1
src/main/org/apache/tools/ant/util/GlobPatternMapper.java View File

@@ -132,7 +132,9 @@ public class GlobPatternMapper implements FileNameMapper {
public String[] mapFileName(String sourceFileName) {
if (fromPrefix == null
|| !modifyName(sourceFileName).startsWith(modifyName(fromPrefix))
|| !modifyName(sourceFileName).endsWith(modifyName(fromPostfix))) {
|| !modifyName(sourceFileName).endsWith(modifyName(fromPostfix))
|| (sourceFileName.length() < (prefixLength + postfixLength))
) {
return null;
}
return new String[] {toPrefix


Loading…
Cancel
Save