In src/main/java/org/apache/maven/shared/filtering/MultiDelimiterInterpolatorFilterReaderLineEnding.java, lines 133–141:
public AbstractFilterReaderLineEnding setDelimiterSpecs(Set<String> specs) {
delimiters.clear();
for (String spec : specs) {
delimiters.add(DelimiterSpecification.parse(spec));
markLength += spec.length() * 2;
}
return this;
}
markLength is accumulated on top of the current value rather than recalculated from base (255 + escapeString.length). If setDelimiterSpecs is called multiple times, markLength grows unbounded. Currently this is safe only because setEscapeString() always follows in Wrapper.getReader() and calls calculateMarkLength() which resets the value. However, this inter-call dependency is fragile and undocumented.
In
src/main/java/org/apache/maven/shared/filtering/MultiDelimiterInterpolatorFilterReaderLineEnding.java, lines 133–141:markLengthis accumulated on top of the current value rather than recalculated from base (255 + escapeString.length). IfsetDelimiterSpecsis called multiple times,markLengthgrows unbounded. Currently this is safe only becausesetEscapeString()always follows inWrapper.getReader()and callscalculateMarkLength()which resets the value. However, this inter-call dependency is fragile and undocumented.