aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Korn <dave.korn.cygwin@gmail.com>2010-03-21 19:36:49 +0000
committerDave Korn <davek@gcc.gnu.org>2010-03-21 19:36:49 +0000
commit713812e2445496115c6cc9d789b2662cdd2225dc (patch)
tree89e398c7f3cebaa4deb0182770c293d9c7bfcace
parent045a52c82eb3dbd7a06bee78d89f7b6c0b0fd543 (diff)
downloadgcc-713812e2445496115c6cc9d789b2662cdd2225dc.zip
gcc-713812e2445496115c6cc9d789b2662cdd2225dc.tar.gz
gcc-713812e2445496115c6cc9d789b2662cdd2225dc.tar.bz2
PR target/42811 (prerequisite)
PR target/42811 (prerequisite) * jvmti.cc (_Jv_GetJVMTIEnv): Avoid use of uninitialised memory. From-SVN: r157605
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/jvmti.cc1
2 files changed, 6 insertions, 0 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index d803ad9..9e14331 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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
diff --git a/libjava/jvmti.cc b/libjava/jvmti.cc
index d9bcc80..3ac6365 100644
--- a/libjava/jvmti.cc
+++ b/libjava/jvmti.cc
@@ -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));