Blame SOURCES/tomcat-7.0.76-rhbz-1588703.patch

9a9096
commit 7f474ba097347fbe4c3db776b46eef59a587c0aa
9a9096
Author: Coty Sutherland <csutherl@apache.org>
9a9096
Date:   Tue Sep 19 14:22:06 2017 +0000
9a9096
9a9096
    Update fix for bug 59904 so that values less than zero are accepted instead of throwing a NegativeArraySizeException.
9a9096
    
9a9096
    git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk@1808887 13f79535-47bb-0310-9956-ffa450edef68
9a9096
9a9096
diff --git a/java/org/apache/tomcat/util/http/Cookies.java b/java/org/apache/tomcat/util/http/Cookies.java
9a9096
index 5ae71ec97c..511bbf3243 100644
9a9096
--- java/org/apache/tomcat/util/http/Cookies.java
9a9096
+++ java/org/apache/tomcat/util/http/Cookies.java
9a9096
@@ -134,7 +134,7 @@ public final class Cookies {
9a9096
         }
9a9096
 
9a9096
         if (cookieCount >= scookies.length) {
9a9096
-            int newSize = Math.min(2*cookieCount, limit);
9a9096
+            int newSize = limit > -1 ? Math.min(2*cookieCount, limit) : 2*cookieCount;
9a9096
             ServerCookie scookiesTmp[] = new ServerCookie[newSize];
9a9096
             System.arraycopy( scookies, 0, scookiesTmp, 0, cookieCount);
9a9096
             scookies=scookiesTmp;
9a9096
diff -up webapps/docs/changelog.xml.orig webapps/docs/changelog.xml
9a9096
--- webapps/docs/changelog.xml.orig	2019-03-01 13:04:17.093997197 -0500
9a9096
+++ webapps/docs/changelog.xml	2019-03-01 13:05:04.168868394 -0500
9a9096
@@ -92,6 +92,14 @@
9a9096
       </fix>
9a9096
     </changelog>
9a9096
   </subsection>
9a9096
+  <subsection name="Other">
9a9096
+    <changelog>
9a9096
+      <fix> 
9a9096
+        Update fix for <bug>59904</bug> so that values less than zero are accepted
9a9096
+        instead of throwing a NegativeArraySizeException. (remm)
9a9096
+      </fix>
9a9096
+    </changelog>
9a9096
+  </subsection>
9a9096
 </section>
9a9096
 <section name="Tomcat 7.0.76-8 (csutherl)">
9a9096
   <subsection name="Catalina">