changeset 5400:3e83229a3779

7167359: (tz) SEGV on solaris if TZ variable not set Reviewed-by: okutsu
author coffeys
date Fri, 11 May 2012 10:09:18 +0100
parents c5a07e3dca63
children 944676ef3c58
files src/solaris/native/java/util/TimeZone_md.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/util/TimeZone_md.c	Fri May 11 16:20:46 2012 +0800
+++ b/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;
     }