On Mon, Oct 15, 2012 at 12:59 PM, Andrew Hughes <ahug...@redhat.com> wrote: >> @@ -170,6 +171,12 @@ Java_java_util_VMTimeZone_getSystemTimeZoneId >> (JNIEnv * env, >> tz2_len = strlen (tz2); >> tzoff_len = jint_to_charbuf (tzoff + 11, tzoffset); >> tzid = (char *) malloc (tz1_len + tz2_len + tzoff_len + 1); /* >> FIXME alloc */ >> + if (tzid == NULL) { >> + JCL_ThrowException (env, "java/lang/OutOfMemoryError", >> + "malloc() failed"); >> + return 0; >> + } >> + >> memcpy (tzid, tz1, tz1_len); >> memcpy (tzid + tz1_len, tzoff + 11 - tzoff_len, tzoff_len); >> memcpy (tzid + tz1_len + tzoff_len, tz2, tz2_len); > > Can the FIXME now be dropped?
Fixed.