PR target/42811 (prerequisite)
authorDave Korn <dave.korn.cygwin@gmail.com>
Sun, 21 Mar 2010 19:36:49 +0000 (19:36 +0000)
committerDave Korn <davek@gcc.gnu.org>
Sun, 21 Mar 2010 19:36:49 +0000 (19:36 +0000)
PR target/42811 (prerequisite)
* jvmti.cc (_Jv_GetJVMTIEnv): Avoid use of uninitialised memory.

From-SVN: r157605

libjava/ChangeLog
libjava/jvmti.cc

index d803ad9..9e14331 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-21  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+       PR target/42811 (prerequisite)
+       * jvmti.cc (_Jv_GetJVMTIEnv): Avoid use of uninitialised memory.
+
 2010-03-13  Matthias Klose  <doko@ubuntu.com>
 
        PR libgcj/42676
index d9bcc80..3ac6365 100644 (file)
@@ -2210,6 +2210,7 @@ _Jv_GetJVMTIEnv (void)
 {
   _Jv_JVMTIEnv *env
     = (_Jv_JVMTIEnv *) _Jv_MallocUnchecked (sizeof (_Jv_JVMTIEnv));
+  memset (env, 0, sizeof (_Jv_JVMTIEnv));
   env->p = &_Jv_JVMTI_Interface;
   struct jvmti_env_list *element
     = (struct jvmti_env_list *) _Jv_MallocUnchecked (sizeof (struct jvmti_env_list));