natClassLoader.cc (_Jv_RegisterClassHookDefault): Use snprintf, not asprintf.
2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz> * java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Use snprintf, not asprintf. From-SVN: r46482
This commit is contained in:
parent
cf521102eb
commit
11598139d3
@ -1,3 +1,8 @@
|
||||
2001-10-25 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
|
||||
|
||||
* java/lang/natClassLoader.cc (_Jv_RegisterClassHookDefault): Use
|
||||
snprintf, not asprintf.
|
||||
|
||||
2001-10-24 Loren J. Rittle <ljrittle@acm.org>
|
||||
|
||||
* configure.in (case $THREADS): Add *-*-freebsd* configuration.
|
||||
|
@ -453,15 +453,14 @@ _Jv_RegisterClassHookDefault (jclass klass)
|
||||
{
|
||||
// If you get this, it means you have the same class in two
|
||||
// different libraries.
|
||||
char *message;
|
||||
asprintf (&message, "Duplicate class registration: %s",
|
||||
char message[200];
|
||||
snprintf (&message[0], 200, "Duplicate class registration: %s",
|
||||
klass->name->data);
|
||||
if (! gcj::runtimeInitialized)
|
||||
JvFail (message);
|
||||
else
|
||||
{
|
||||
java::lang::String *str = JvNewStringLatin1 (message);
|
||||
free (message);
|
||||
throw new java::lang::VirtualMachineError (str);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user