You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ri...@apache.org on 2002/03/22 16:29:51 UTC
cvs commit: xml-axis/java/src/org/apache/axis/attachments BoundaryDelimitedStream.java
rineholt 02/03/22 07:29:51
Modified: java/src/org/apache/axis/attachments
BoundaryDelimitedStream.java
Log:
Make certain that boundary array is never tampered with.
Revision Changes Path
1.9 +4 -2 xml-axis/java/src/org/apache/axis/attachments/BoundaryDelimitedStream.java
Index: BoundaryDelimitedStream.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/attachments/BoundaryDelimitedStream.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- BoundaryDelimitedStream.java 15 Mar 2002 01:14:10 -0000 1.8
+++ BoundaryDelimitedStream.java 22 Mar 2002 15:29:51 -0000 1.9
@@ -157,8 +157,10 @@
streamNo= newStreamNo();
closed = false;
this.is = is;
- this.boundary = boundary;
- this.boundaryLen = boundary.length;
+ //Copy the boundary array to make certain it is never altered.
+ this.boundary= new byte[boundary.length];
+ System.arraycopy(boundary,0,this.boundary,0, boundary.length);
+ this.boundaryLen = this.boundary.length;
this.boundaryBufLen = boundaryLen + 2;
//allways leave room for at least a 2x boundary
//Most mime boundaries are 40 bytes or so.