Description
public void writeCacheTo(StringBuilder out, int limit) throws IOException {
...
if ((count + x) > limit)
out.append(new String(bytes, 0, x));
count += x;
...
}
If limit is reached x becomes negative and String construction fails with
java.lang.StringIndexOutOfBoundsException: String index out of range: -784
at java.lang.String.checkBounds(String.java:368)
at java.lang.String.<init>(String.java:457)
at org.apache.cxf.io.CachedOutputStream.writeCacheTo(CachedOutputStream.java:272)