#1 crash if no CLASSPATH variable available

closed-fixed
5
2001-06-09
2001-06-05
Anonymous
No

If the CLASSPATH env variable not set
the program crashes.

NULL-pointer handling in file JVM.cpp:

void JVM::appendClassPath(const std::string& classPath)
{
if ( JVM::classPath == "" )
JVM::classPath = getenv( "CLASSPATH" );

JVM::classPath += pathSeparator;
JVM::classPath += classPath;
}

Reason getenv("...") returns NULL and the string
operation ...classPath+=pathSeperator trys to
connect a NULL pointer with pathSeparator

Discussion

  • Phillip E. Trewhella

    • labels: --> core runtime library
    • assigned_to: nobody --> ptrewhella
     
  • Phillip E. Trewhella

    Logged In: YES
    user_id=123204

    This bug has been fixed and will be part of the 0.2 release
    (or you can optionally build from the source).

     
  • Phillip E. Trewhella

    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks