7167359: (tz) SEGV on solaris if TZ variable not set
authorcoffeys
Fri, 11 May 2012 10:09:18 +0100
changeset 12689 35cbede4f958
parent 12688 f15fd32c975e
child 12690 a2d28a91f9b7
7167359: (tz) SEGV on solaris if TZ variable not set Reviewed-by: okutsu
jdk/src/solaris/native/java/util/TimeZone_md.c
--- a/jdk/src/solaris/native/java/util/TimeZone_md.c	Fri May 11 16:20:46 2012 +0800
+++ b/jdk/src/solaris/native/java/util/TimeZone_md.c	Fri May 11 10:09:18 2012 +0100
@@ -651,7 +651,7 @@
     }
 
 #ifdef __solaris__
-    if (strcmp(tz, "localtime") == 0) {
+    if (tz != NULL && strcmp(tz, "localtime") == 0) {
         tz = getSolarisDefaultZoneID();
         freetz = tz;
     }