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
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Mar 05 12:50:01 PST 2001
>Originator:     dherman@sccx.com
>Release:        Apache-JServ 1.1.2
I found the bug in the code, not by running the program.
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.
Feed "../MyClass.class" to AdaptiveClassLoader.loadClassFromDirectory()
Change line 562 to:

classFileName = classFileName.substring(start - 1);
 [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!     ]

View raw message