Received: (qmail 42105 invoked by uid 501); 5 Mar 2001 20:49:49 -0000 Message-Id: <20010305204949.42104.qmail@apache.org> Date: 5 Mar 2001 20:49:49 -0000 From: David Herman Reply-To: dherman@sccx.com To: submit@bugz.apache.org Subject: AdaptiveClassLoader.loadClassFromDirectory() off-by-one error X-Send-Pr-Version: 3.110 >Number: 7360 >Category: mod_jserv >Synopsis: AdaptiveClassLoader.loadClassFromDirectory() off-by-one error >Confidential: no >Severity: non-critical >Priority: medium >Responsible: jserv >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Mar 05 12:50:01 PST 2001 >Closed-Date: Mon Mar 05 13:49:41 PST 2001 >Last-Modified: Mon Mar 05 13:49:41 PST 2001 >Originator: dherman@sccx.com >Release: Apache-JServ 1.1.2 >Organization: >Environment: I found the bug in the code, not by running the program. >Description: Lines 555 - 564 in org/apache/java/lang/AdaptiveClassLoader chops of the leading #start# characters from the beginning of an invalid class file name such as "../MyClass.class" - which means for the preceding example you would get "yClass.class". It ought to chop off the leading #start - 1# characters. >How-To-Repeat: Feed "../MyClass.class" to AdaptiveClassLoader.loadClassFromDirectory() >Fix: Change line 562 to: classFileName = classFileName.substring(start - 1); >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: jon@clearink.com State-Changed-When: Mon Mar 5 13:49:41 PST 2001 State-Changed-Why: code checked in and bug fixed. thanks david! >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database 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! ]