Author: toad
Date: 2006-10-02 20:33:03 +0000 (Mon, 02 Oct 2006)
New Revision: 10593

Modified:
   trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.java
   trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.jflex
Log:
Fix string out of bounds error.

Modified: trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.java       
2006-10-02 19:18:19 UTC (rev 10592)
+++ trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.java       
2006-10-02 20:33:03 UTC (rev 10593)
@@ -1,4 +1,4 @@
-/* The following code was generated by JFlex 1.4.1 on 29/09/06 22:11 */
+/* The following code was generated by JFlex 1.4.1 on 02/10/06 21:14 */

 /* This code is part of Freenet. It is distributed under the GNU General
  * Public License, version 2 (or at your option any later version). See
@@ -14,7 +14,7 @@
 /**
  * This class is a scanner generated by 
  * <a href="http://www.jflex.de/";>JFlex</a> 1.4.1
- * on 29/09/06 22:11 from the specification file
+ * on 02/10/06 21:14 from the specification file
  * <tt>freenet/clients/http/filter/CSSTokenizerFilter.jflex</tt>
  */
 class CSSTokenizerFilter {
@@ -973,7 +973,10 @@
                        data = buffer.toString();
                        if(url && s.length() > x+1 && s.charAt(x) == ')')
                                x++;
-                       suffix = s.substring(x);
+                       if(x < (s.length()-1))
+                               suffix = s.substring(x);
+                       else
+                               suffix = "";
                }

                public String toString() {

Modified: trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.jflex
===================================================================
--- trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.jflex      
2006-10-02 19:18:19 UTC (rev 10592)
+++ trunk/freenet/src/freenet/clients/http/filter/CSSTokenizerFilter.jflex      
2006-10-02 20:33:03 UTC (rev 10593)
@@ -162,7 +162,10 @@
                        data = buffer.toString();
                        if(url && s.length() > x+1 && s.charAt(x) == ')')
                                x++;
-                       suffix = s.substring(x);
+                       if(x < (s.length()-1))
+                               suffix = s.substring(x);
+                       else
+                               suffix = "";
                }

                public String toString() {


Reply via email to