You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cs...@apache.org on 2017/09/19 14:07:02 UTC

svn commit: r1808880 - in /tomcat/tc8.5.x/trunk: java/org/apache/tomcat/util/http/ServerCookies.java webapps/docs/changelog.xml

Author: csutherl
Date: Tue Sep 19 14:07:02 2017
New Revision: 1808880

URL: http://svn.apache.org/viewvc?rev=1808880&view=rev
Log:
Update fix for bug 59904 so that values less than zero are accepted instead of throwing a NegativeArraySizeException.

Modified:
    tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/http/ServerCookies.java
    tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/http/ServerCookies.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/http/ServerCookies.java?rev=1808880&r1=1808879&r2=1808880&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/http/ServerCookies.java (original)
+++ tomcat/tc8.5.x/trunk/java/org/apache/tomcat/util/http/ServerCookies.java Tue Sep 19 14:07:02 2017
@@ -49,7 +49,7 @@ public class ServerCookies {
         }
 
         if (cookieCount >= serverCookies.length) {
-            int newSize = Math.min(2*cookieCount, limit);
+            int newSize = limit > -1 ? Math.min(2*cookieCount, limit) : 2*cookieCount;
             ServerCookie scookiesTmp[] = new ServerCookie[newSize];
             System.arraycopy(serverCookies, 0, scookiesTmp, 0, cookieCount);
             serverCookies = scookiesTmp;

Modified: tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml?rev=1808880&r1=1808879&r2=1808880&view=diff
==============================================================================
--- tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml Tue Sep 19 14:07:02 2017
@@ -59,6 +59,14 @@
       </add>
     </changelog>
   </subsection>
+  <subsection name="Other">
+    <changelog>
+      <fix>
+        Update fix for <bug>59904</bug> so that values less than zero are accepted
+        instead of throwing a NegativeArraySizeException. (remm)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 8.5.21 (markt)" rtext="release in progress">
   <subsection name="Catalina">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org