changeset 7486:ed7c598c21b0

8015421: NegativeArraySizeException occurs in ChunkedOutputStream() with Integer.MAX_VALUE Summary: Ensure integer overflow does not occur Reviewed-by: chegar
author khazra
date Thu, 13 Jun 2013 11:23:00 -0700
parents e4e37cd21ae2
children 1a01b176f86a
files src/share/classes/sun/net/www/http/ChunkedOutputStream.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/net/www/http/ChunkedOutputStream.java	Mon Feb 17 16:15:50 2014 +0000
+++ b/src/share/classes/sun/net/www/http/ChunkedOutputStream.java	Thu Jun 13 11:23:00 2013 -0700
@@ -125,7 +125,7 @@
         completeHeader = getHeader(preferredChunkDataSize);
 
         /* start with an initial buffer */
-        buf = new byte[preferredChunkDataSize + 32];
+        buf = new byte[preferredChunkGrossSize];
         reset();
     }