changeset 831:1075888098ed

. Use strncpy rather than strlcpy. Although the latter is safer, Linux doesn't have it.
author glewis@misty.eyesbeyond.com
date Wed, 11 Feb 2009 07:56:01 -0800
parents 7c068a5cd148
children b89125f34e15
files src/solaris/native/java/util/TimeZone_md.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/util/TimeZone_md.c	Wed Feb 11 07:55:01 2009 -0800
+++ b/src/solaris/native/java/util/TimeZone_md.c	Wed Feb 11 07:56:01 2009 -0800
@@ -268,7 +268,8 @@
         return NULL;
     }
 
-    strlcpy(zoneinfo_file, default_zoneinfo_file, PATH_MAX+1);
+    strncpy(zoneinfo_file, default_zoneinfo_file, PATH_MAX);
+    zoneinfo_file[PATH_MAX] = '\0';
 
 #if defined(__linux__) || defined(_ALLBSD_SOURCE)
     /*