You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Vadim Tkachenko <vt...@freehold.crocodile.org> on 1998/09/24 23:32:04 UTC
mod_jserv/3067: JServ hangs for a long time and then throws the StringIndexOutOfBoundsException
>Number: 3067
>Category: mod_jserv
>Synopsis: JServ hangs for a long time and then throws the StringIndexOutOfBoundsException
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jserv
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Thu Sep 24 14:40:00 PDT 1998
>Last-Modified:
>Originator: vt@freehold.crocodile.org
>Organization:
apache
>Release: Apache 1.3.1 + JServ snap 19980923
>Environment:
JSK 1.2beta4 on Solaris 2.6/x86, but probably platform-independent
>Description:
String consisting of a single space in any config file being read by
org.apache.java.util.Configurations makes it hang for a long time and then throw
the StringIndexOutOfBoundsException.
The deep cause is that java.lang.String.trim() doesn't change the " " string.
>How-To-Repeat:
Insert a string consisting of a single space into any configuration file being read
by org.apache.java.util.Configurations. Get some patience and watch.
>Fix:
Easy fix:
--- src/java/org/apache/java/util/Configurations.java.orig Thu Sep 24 16:24:30 1998
+++ src/java/org/apache/java/util/Configurations.java Thu Sep 24 16:24:54 1998
@@ -171,7 +171,7 @@
// avoiding cases where the line really ends with
// a legitimate '\\', for example "dir=C:\\"
int endindex = line.length() - 1;
- if( endindex < 0 )
+ if( endindex <= 0 )
break;
int i;
for(i=endindex; i<=0 || line.charAt(i)=='\\'; i--) ;
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig- ]
[nored unless you are responding to an explicit request ]
[from a developer. ]
[Reply only with text; DO NOT SEND ATTACHMENTS! ]