--- a/jdk/src/solaris/native/sun/awt/gtk2_interface.c Tue Apr 16 21:19:02 2013 +0400
+++ b/jdk/src/solaris/native/sun/awt/gtk2_interface.c Thu Apr 18 13:52:38 2013 +0100
@@ -31,6 +31,7 @@
#include "gtk2_interface.h"
#include "java_awt_Transparency.h"
#include "jvm_md.h"
+#include "sizecalc.h"
#define GTK2_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gtk-x11-2.0", "0")
#define GTK2_LIB JNI_LIB_NAME("gtk-x11-2.0")
@@ -765,7 +766,8 @@
gtk_modules_env && strstr (gtk_modules_env, "gail"))
{
/* the new env will be smaller than the old one */
- gchar *s, *new_env = malloc (sizeof(ENV_PREFIX)+strlen (gtk_modules_env));
+ gchar *s, *new_env = SAFE_SIZE_STRUCT_ALLOC(malloc,
+ sizeof(ENV_PREFIX), 1, strlen (gtk_modules_env));
if (new_env != NULL )
{