summaryrefslogtreecommitdiff
path: root/java/openjdk6/files/icedtea/security/20130201/7186954.patch
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2013-10-09 20:36:06 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2013-10-09 20:36:06 +0000
commitf78b1b9ba06ffbbdecee2801917443f79011f134 (patch)
treefc3ef7699ec2d5dff96245bc6d90117d597fb678 /java/openjdk6/files/icedtea/security/20130201/7186954.patch
parentBump PORTREVISION after plist change (diff)
Update to Build b28.
Diffstat (limited to 'java/openjdk6/files/icedtea/security/20130201/7186954.patch')
-rw-r--r--java/openjdk6/files/icedtea/security/20130201/7186954.patch81
1 files changed, 0 insertions, 81 deletions
diff --git a/java/openjdk6/files/icedtea/security/20130201/7186954.patch b/java/openjdk6/files/icedtea/security/20130201/7186954.patch
deleted file mode 100644
index b3fbfcaafb0b..000000000000
--- a/java/openjdk6/files/icedtea/security/20130201/7186954.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-# HG changeset patch
-# User dmeetry
-# Date 1352295947 -14400
-# Node ID ee4632a30696050ebd5c014fb3da64112ab48dd3
-# Parent 6e2d4ed84b41667df189abb7bd0915cda01a85a0
-7186954: Improve connection performance
-Reviewed-by: khazra
-
-diff --git a/src/share/classes/sun/net/httpserver/ChunkedInputStream.java b/src/share/classes/sun/net/httpserver/ChunkedInputStream.java
---- jdk/src/share/classes/sun/net/httpserver/ChunkedInputStream.java
-+++ jdk/src/share/classes/sun/net/httpserver/ChunkedInputStream.java
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
-@@ -41,8 +41,12 @@ class ChunkedInputStream extends LeftOve
-
- private boolean needToReadHeader = true;
-
-- static char CR = '\r';
-- static char LF = '\n';
-+ final static char CR = '\r';
-+ final static char LF = '\n';
-+ /*
-+ * Maximum chunk header size of 2KB + 2 bytes for CRLF
-+ */
-+ private final static int MAX_CHUNK_HEADER_SIZE = 2050;
-
- private int numeric (char[] arr, int nchars) throws IOException {
- assert arr.length >= nchars;
-@@ -73,9 +77,13 @@ class ChunkedInputStream extends LeftOve
- char[] len_arr = new char [16];
- int len_size = 0;
- boolean end_of_len = false;
-+ int read = 0;
-
- while ((c=(char)in.read())!= -1) {
-- if (len_size == len_arr.length -1) {
-+ read++;
-+ if ((len_size == len_arr.length -1) ||
-+ (read > MAX_CHUNK_HEADER_SIZE))
-+ {
- throw new IOException ("invalid chunk header");
- }
- if (gotCR) {
-diff --git a/src/share/classes/sun/net/www/http/ChunkedInputStream.java b/src/share/classes/sun/net/www/http/ChunkedInputStream.java
---- jdk/src/share/classes/sun/net/www/http/ChunkedInputStream.java
-+++ jdk/src/share/classes/sun/net/www/http/ChunkedInputStream.java
-@@ -1,5 +1,5 @@
- /*
-- * Copyright (c) 1999, 2006, Oracle and/or its affiliates. All rights reserved.
-+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
-@@ -125,6 +125,11 @@ class ChunkedInputStream extends InputSt
- */
- private boolean closed;
-
-+ /*
-+ * Maximum chunk header size of 2KB + 2 bytes for CRLF
-+ */
-+ private final static int MAX_CHUNK_HEADER_SIZE = 2050;
-+
- /**
- * State to indicate that next field should be :-
- * chunk-size [ chunk-extension ] CRLF
-@@ -290,6 +295,10 @@ class ChunkedInputStream extends InputSt
- break;
- }
- pos++;
-+ if ((pos - rawPos) >= MAX_CHUNK_HEADER_SIZE) {
-+ error = true;
-+ throw new IOException("Chunk header too long");
-+ }
- }
- if (pos >= rawCount) {
- return;