www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Herman <dher...@sccx.com>
Subject mod_jserv/7360: AdaptiveClassLoader.loadClassFromDirectory() off-by-one error
Date Mon, 05 Mar 2001 20:49:49 GMT

>Number:         7360
>Category:       mod_jserv
>Synopsis:       AdaptiveClassLoader.loadClassFromDirectory() off-by-one error
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jserv
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Mar 05 12:50:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     dherman@sccx.com
>Release:        Apache-JServ 1.1.2
>Organization:
apache
>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:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> 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!     ]
 
 


Mime
View raw message